i'd imagine that a char could be tagged with a variable after arriving through a trans, or when entering one, and the command could port you back to that last location. Could probably make it so that it can't be used in combat too I'd imagine.
Of course, there is another option as well, grappling hooks on ropes with one use of port five to ten meters as a minor climbing implement for such situations, and just make it at about half the price of a misty orb and only sold in mountain towns. That way you could use it to get unstuck and it wouldn't have much other use, it could also be made to not be usable in combat, nod, nod.