Improvement to comparing duplicated AST node children