It's clever how it leverages the type checker to check generic arguments,
but calling checkGenericArguments() would have been simpler, and it doesn't
work for interface types anyway, so we would fail to demangle those.
Let's just cut this all out for now and build a BoundGenericType directly.
When an enum is imported as an error, the imported type itself becomes
a nested type 'Code' of its wrapper type, so you get a type like
'MyError.Code'. However in the mangling grammar the type is a
child of a module and not another type.
This was tripping up TypeDecoder, which would check parent types for
validity and throw out the demangling since it looked invalid.
However since this case really is valid, just skip the whole parent
type mess when the type is imported and non-generic.