[GHC] #9662: stack overflow in type checker