That shouldn't be a glitch, a lot of games have that as feature, which I like. It's not like you're going to empty the rounds from a magazine to top up another one in the middle of a firefight.
One of the reasons I like ArmA so much is that it remembers how many rounds are left in each magazine, when you re-load, it puts the one with the most in the gun. If you re-load after every few shots, like people do in most FPS games, then you'll eventually be left with 10 magazines with 3 or 4 shots in each.