[GHC] #14625: Casts get in the way of calculating unfolding discount