[GHC] #8477: Allow inferring ambiguous types