SortNode: our variables can also be in other ExecutionNodes then the Calculation node. Take this into account.
SortIndex optimizer: when looking at our properties only check Calculation nodes, ignore other types of ExecutionNodes