This fixes a severe bug in llvm::Linker that occurs when a type is actually represented by the same Type object in the two modules (as in, the pointers are equal).
Previously, only the top-level type was added to the MappedTypes in that case. If the contained types did not appear in another artifact on their own, this led the instruction rewrites, etc. that are run later to erroneously assume that they need to make changes.
I'm not quite sure what the easiest way to add a regression test for this would be, i.e. how to best get the LLVM command line tools to use the same Type instance.