This has been reported earlier. Most likely a bug caused when aiming through the scope of weapon x, then when trying to swap to weapon y “too fast” your character seems to swap but puts up weapon x again (though the icons lower right corner shows that you have swapped to weapon y).
Swapping one more time will cause your character to again put up weapon x, so swapping yet again will finally get you weapon y in your hands.
Same goes for items in the quick selection (when trying to swap to one when aiming through a scope), although those are both easier and faster to get a hold of - just press the button in question again.