[GHC] #15766: GeneralizedNewtypeDeriving should support classes with ambiguous types