(this works 100% of the time for me)
To recreate the Jump Jet barracks glitch:
1. alt barracks and set rally point far enough away that the JJ will fly when it spawns.
2. build jump jet
3. move the JJ across the map as soon as it spawns from the barracks.
4. while the jump jet is in the air no units will spawn from the barracks. When the JJ lands units will begin spawning, but you've lost all the money from building previous units. I didn't test it, but I think if the JJ dies in the air then your barracks is permanently stuck.
If you let the JJ spawn and actually go to the rally point, it will not glitch your barracks. I think because the JJ does a sort of bounce when it comes out of the barracks, it will spawn flying but land and then restart flying again to the rally point.
If your rally point is a short distance then the JJ will spawn on the ground and never glitch your barracks.