Changes corresponding to ghc trac 8768