This probably comes from an already existing bug, Where sometimes (Pretty rare since I've only seen it a few times) if you join the other team, you stay as the colour of your previous team, Allowing your team to kill you.
However it's auto correcting as it resets upon death.