[GHC] #12787: Weird type constraint with undecidable instances