When I have stacks of ammo in my inventory and I empty a box of ammo or a magazine the stacks will sometimes lose ammo.
The stack will either lose some of the rounds, like 30 stack going to 10 or 20 or will lose all of the ammo and the stack will be in my inventory still, but says it contains 0 rounds.
I have even seen this happen to stacks that are inside of an ammo can.