Fix AST nodes being rearranged for non-commutative operators