rewrite fix for instantiating internal/external subset DTDs by properly copying them