pivot-table: Properly allocate pivot_table's current_layer.