If Dynamic Costs are enabled, the cost multiplier will not stay put. This is by design and what Dynamic Costs are all about - changing the cost muliplier automatically. You can set the current value manually and it will start automatically adjusting it from that new value, but as long as dynamic costs are enabled, CostX will get modified dynamically if the population is outside the range.
When Dynamic Costs are disabled, CostX should not change. I can't seem to make it happen, but perhaps because you are setting the reinstatement level to 0, the code is attempting to reinstate a previous CostX since the population is now above the threshold of 0. Set it to somethign big and see if CostX still changes on you when dynamic costs are disabled.
On a related note, the reason the dynamic costs population only refers to heterotrofs is that veggies with reproduction genes can result in sudden swings in autotropic population numbers in a single cycle (when the veggy population first falls below the max veggy number, they all reproduce). Now that we have the ability to disable reproduction for specific species, we could change it so that the population number refers to all bots in the sim if there was interest...