Please use $this->_lineItem rather then fetching again. I think we should move this code down after CRM_Price_BAO_PriceSet::processAmount function since changes to line item might not work in above code.