GHC produces wrong error messages for reexported modules from hidden packages
## Steps to reproduce
```console
$ ghci -hide-all-packages -package ghc-internal
ghci> import GHC.Types
<no location info>: error: [GHC-87110]
Could not load module ‘GHC.Types’.
It is a member of the hidden package ‘ghc-internal-9.1401.0’.
You can run ‘:set -package ghc-internal’ to expose it.
(Note: this unloads all the modules in the current scope.)
```
Note that:
- `ghc-internal` provides `GHC.Internal.Types`
- `ghc-prim` reexports `GHC.Internal.Types` as `GHC.Types`
## Expected behavior
The error message should mention `ghc-prim` instead of `ghc-internal`.
## Environment
* GHC version used: 9.14.1
issue