The known case is where you hit ‘E’, then you perform vertical knife attack, then you switch back to your previous weapon.
But there is also the case when having equipped knife by pressing ‘3’, and then pressing ‘E’ out of this weaponslot. What happens then is that you will make a weaponswitch nevertheless to previous weapon. This is the bug, which i think shouldn’t happen.