It could be done with some talented scripting but would involve changing the way the DB saves information to the hive - IE: ["DMR_Mag["15"]","DMR_Mag["20"]"] etc...
Problem is that the of hive calls are hardcoded.
I have seen servers where this is fixed (DMR mags dont refresh in your backpack). Unfortunately, they do refresh when you switch to a Ghillie. So Vamps point is pretty clear, regardless of the fact that it can be fixed, the engine wasn't purpose built to stop this from happening, so there will be a lot of ways of getting around such a fix.
A better option may be a script that attempts to stop this occurring by counting the mags a player has versus the shots fired and if the two don't add up - BAM - Message to an admin. But I doubt that would be lightweight and would probably cause low server FPS.