On the way back from a mission, my firebird looked like it was going to run into a UFO.
I clicked on it, and chose "new home base", choosing a base that was much closer and apparently had hanger space. No problem.
However, the base in question, whilst it had a completed hangar, did not have a completed power-plant.
As a result, after landing my firebird was no longer available.
***
The script for changing a home-base whilst in flight needs to check not only hangar space, but that the hangar in question has a functioning power-supply. And, presumably, it would also need a functioning living quarters with room for the troops that are currently on board.