It sounds like this is a bug and should be reported. If a wormhole causes a survey ship to go to space outside the ship's range the only orders you should be able to give it should be to return to space within its range. I have done this by clicking on the ship to get it selected then right clicking on space within its range, The ship should also work this way in auto survey mode, but they may have forgotten that piece of the code.