I think I have found a fix for this issue. A patch for ido.el is attached. The solution is essentially to simulate re-typing the current ido input into the fallback command's prompt rather than modifying dynamic variables to trick the fallback command into starting in the right place. Note that this is NOT thoroughly tested yet. It seems to work for the specific case described in this bug (ido-write-file), but I need to test it for some time to make sure it isn't breaking other cases at the same time. I will use this fix in my Emacs for some time and report back.