duplicated class should happen during the xml parsing and not during the metadata map creation.
please see forum reference for complete analysis and proposed workaround.