Setting schedule isitemized to false removes sorting

Whenever I try to set a schedules itemize every instance property to false it removes sorting applied to the schedule. This happens with Archi-labs node and a python node I copied here. This happens if I place the node or python node before or after Archi-lab’s schedule sorting grouping node.

import clr

# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

ProcessLists = lambda function, lists: [ProcessLists(function, item) if isinstance(item, list) else function(item) for item in lists]
ApplyFunction = lambda func, objs: ProcessLists(func, objs) if isinstance(objs, list) else [func(objs)]

def Unwrap(item):
    return UnwrapElement(item)
if isinstance(IN[0], list):
	schedule = ProcessLists(Unwrap, IN[0])
	schedule = Unwrap(IN[0])

itemize = IN[1]
def task(schedule):
	definition = schedule.Definition
	result = definition
	result.IsItemized = itemize
	return result

OUT = ApplyFunction(task,schedule)