[GHC] #14350: Infinite loop when typechecking incorrect implementation (GHC HEAD only)