[GHC] #9258: Type inference fails with closed type families