[GHC] #11464: Type casts cause confusing error