The Mass edit program are meant to change the cost for specific item or range. Once you perform the mass edit why are you perfroming the cost roll up again?
The ideal Scenario is that you should do cost rollup. If you find that no the cost of materail / material overhead is incorrect and you need to change it with specific value. The you should use mass edit to perfrom the cost change.
Also if you do it vice versa (current case) the cost that is rolled up in cost roll up is and should mandatory update th cost that has been perviously updated by mass edit.