I think I solved this by experimentation, but please let me know if what I did is incorrect.
I found the variable 003EBO_RETURN_DEST and set it to 0 (I think it was set to 1, but I forgot to take a mental note). This was a numerical global and not a boolean global so I don't know what the value 0 stands for. On traveling to Dantooine I was not teleported magically to Telos Academy. The value of the global then changed to 5. It appears to be working for further travel, so I'm going to consider the issue solved.
For future reference, the issue appears to have arisen during some discussion with Handmaiden on the ship. Also, I later found this website which gives a script for adding planets to the game: Link This site mentions that the variable is used to change the location that one is sent to when leaving the ship. I wasn't even on the ship after traveling to a new planet, just sent straight to Telos, but it apparently affects that as well.
Let me know if you have a similar problem, so I can try to help you.