I think we should check the unnamed structs locations/positions in the context otherwise the Importer thinks in case of the "struct Unnamed" test case that the inner structs types (R and S) should be equivalent and would give a warning because of type mismatch.
On the other hand it is not enough since the findUntaggedStructOrUnionIndex should be able to deal with nested structs when the RecordType is deep inside an ElaboratedType.
With these changes I do not see the point of the removed else statement (L3079).
Test cases added.
Important to notice that:
union { int i; float f; };
is an anonymous (and unnamed) union but
union { int i; float f; } U;
is not anonymous but I referred to it as unnamed. (Hopefully good wording.)