If you have a bayonet on your weapon and a silencer at your inventory, you can't swap the bayonet and silencer to be exact. The only way to put the silencer on the weapon is to take out the bayonet from the weapon and put the silencer.
I am reporting this since it is possible to swap sights etc but not those.