DocumentTypeManager Dictionary bug.

Fixing "An item with the same key has already been added." bug in
DocumentTypeManager.

The same bug may be present in other managers but I don't have the
opportunity just now to look at those.