I led a stinger squad during my time in the military. At least the German stinger called Fliegerfaust has not this kind of friend and foe technology.
Also I didn't believe, that it would lock on a heavy machine gun.
This is because there are two sensors in the head of this missle. One sensors the UV light, that comes from the sun. Where the aircraft is, is a shadow. This is the target.
Another one sensors the heat of the aircraft, that is from the aerodynamic drag and the engine.
Also this missle has a special convergence to the aircraft. It flies a great bow, not directly to the target.
Plus I think the heavy machine gun squad was near the stinger fiering squad. The story is because of this impossible too, because the missle looses some altitude after the starting engine is burned out. It would fall on the ground.
Either this story is madeup, or the Israelis managed to sent the quranimals manipulated missles.