Panic bug? Seems random?

What I have noticed recently is a strange thing, it does not happen to often so I can’t see what triggers it? BUT… sometimes I am in a mission and doing really well no casualties or damage and no sirens and for no reason they just start to panic and run all over the place? I have not seen why this should happen, just seems to randomly kick in sometimes, usually in the very early stages of the game? And they always tend to run right into the enemy line of sight or even worse right up to them, if your panicked you should run in the opposite direction, panic does not mean total idiot!