[GHC] #12677: Type equality in constraint not used?