ISPN-3589 StackOverflow in InternalMetadataImpl.Externalizer

https://issues.jboss.org/browse/ISPN-3589