If you have the inventory menu open with a handgun equipped then close the menu and then press your "Toggle Raise Weapon" key your character will cycle through his primary weapon before pulling the handgun back out. He will cycle through the primary weapon animation regardless of whether or not you have a primary weapon.
This issue is present in both the standing and crouched stances.
This was done on 1.54.133353 (RC Branch)
Video displaying this here: https://youtu.be/ACjM5Rt-4LM