When using the number keys to swap from a 'weapon (including things like flashlight and compass)' to another 'weapon,' or when swapping from a 'weapon' to an inventory item like bandages or a water bottle pressing the assigned key merely unequips the weapon, rather than unequipping and then switching.
Addendum: Seems to only happen when crouched or prone.