Repeated friends are deduplicated when imported, but StructuralEquivalence checks friends by exact matching.
If ToContext is empty (not containing the class to be imported), the imported friends are deduplicated, any
further importing of the class would be rejected at the structure equivalence checking, i.e:
struct foo { friend class X; friend class X; }; // FromContext
only one friend is imported, similar to the following:
struct foo { friend class X; }; // ToContext
but when imported again, struct foo in FromContext is reported as not equivalent to struct foo in ToContext,
thus rejected.
The structural equivalence checking algorithm is improved by applying similar deduplication as Importer does.
Thus from StructuralEquivalence's point of view, the above two RecordDecls are equivalent.