Thanks for sharing that Bob. If I'm understanding your code correctly, your NPC behaviour occurs while you're still in the dialog right? So, as soon as the final conversation node appears on screen, he moves away and (after a certain distance of travel) breaks the conversation himself?
In my scenario, I want to wait until the player ends the conversation, then have the NPC move. The DialogEnded function might be a likely candidate (thanks Rhidian!) if I can figure out how to avoid this text box glitch, but I still need to work out how to make the DialogEnded() conditional, have it only fire when a specific dialog flag was chosen mid-dialog.