GHC 7.10 regression when using foldr