[GHC] #12055: Typechecker panic instead of proper error