Duplicate DocType File Fix (1.5.8)

Better checking when adding a doctype to our internal dictionary - if
it's already added - don't do it again