[GHC] #9811: constant folding with infinities is wrong