"normally" it doesn't matter - it's the other half of the ship that changes, and even then the direction was about the same. However when they don't match up the craft spins ...er... chaotically, as the torques kOS calculates are applied at odd angles.
Once the user manually does a "control from here" action the system handles things in its usual way.
Suggested fix - the first kOS module in a vessel always makes itself the current transform whenever it boots or the partcount changes.
vessel.SetReferenceTransform(part);
possibly?