Somehow lost this crucial piece of code for the per-product prorating. It was a late night...
Don't apply prorating discount if the resulting price is negative.
Call out to commerce_line_item_unit_price_subtract() instead of replicating it.