I'm running the Dev build, but I remember having this issue in the stable version too.
My first idea was it's reason is one of the mods, but tested vanilla too.
I wanted to create a random gear selecting script to make police officers have random loadout and look, but this bug makes them look stupid.
Edit:
Found a command on forums to solve this problem for me:
_unit action ['SwitchWeapon', _unit, _unit, 100];};
But I think it should work by itself.