semantic: Use scope names when mangling types.

This means symbols imported from other modules will
be mangled as belonging to the correct module.