@Mind-Brain I found out what it was by deleting each piece of the code and following it to its source: the spawn transform. Apparently, the missile spawn transform was linked to the missile hatch location, via a socket on the hatch joint.
The socket had 0 scale.
Thank you guys especially @Mind-Brain for helping out with this one.
MORAL OF THE STORY: CHECK YOUR SPAWN TRANSFORM. It may have no scale and screw up everything afterwards.