The problem is that you will get ChildLostFocus for the editfield being left. Then prompt popups and you are getting another one (for the new editfield), BUT at that moment, you do not have your "lastFocus" changed yet (because you have not given it a chance to happen).
Actually, the real moral of the story is "do not change the focus in the process of changing the focus"