fix flat-rate discounts when charging zero months, #17043