Surprising specialisation with INCOHERENT and rank 2 types
## Summary
See README: https://gitlab.haskell.org/Leary/repro-ivts
## Steps to reproduce
Run `cabal test` or `./ghc-test -O1` in the linked repo.
## Expected behavior
The test should pass.
## Environment
* GHC version used: 9.8.2; 9.10.1
Optional:
* Operating System: NixOS
* System Architecture: x86_64
issue