Well, if you assume “sane”, then you can do whole-function (or basic block) rewriting if the detour would overwrite other reachable instructions. More annoying for sure, but should be doable.