There is a bug within the game, that when you quick-reload a fully loaded magazine (or any magazine with ammunition in it) sometimes the character racks back the bolt even though there is still ammo available.
Along with that, resupplying unequips the gas-mask if you are wearing it.