Bug 3191: Optimisation of serialisation of IdentityrefTypeDefinition