[GHC] #12538: Incorrect uses of overlapping instances and data families sends GHC into loop