Here’s why: XML Schema does not allow an element to hold two child elements with the same name unless the child elements can be determined to have the same type. A human can visually look at the Russian Doll schema and see that the two
A elements have the same type:
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="A"/>
</xs:restriction>
</xs:simpleType>
Although, the lexical schema type definition,
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="A"/>
</xs:restriction>
</xs:simpleType>
appearing at two different places, look to be equivalent type definitions, I think an XSD processor shouldn't be attempting to determine this XSD type equality (in a general case, it'd be very hard to determine XSD type equality by comparing in-memory XSD type component definitions).
Consider, the following XSD 1.1 type definitions,
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:assertion test="$value = 'A'"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:assertion test="$value = 'B'"/>
</xs:restriction>
</xs:simpleType>
Its nearly impractical, to determine whether such type definitions are equal.