Tidy up computation of result discounts in CoreUnfold