The Gemara (Berachos 42a) writes that there mustn't be a hefsek between washing and eating. Seemingly, this would include davening.
Hagahos Maimoniyos (Berachos 6:17) mentions a Machlokes amongst the Geonim as to whether one could wash one's hands once for both asher yatzar and bread. What's important is that there is no hefsek (which would be a problem in your scenario). The Mordechai (Berachos 204) stresses that there mustn't be a hefsek between washing and the meal - hence one couldn't say asher yatzar before eating.
See the Shulchan Aruch and Mishna Berura
Teshuvos Vehanhagos 1:170:3 discusses scratching one's head or doing something similar to ensure that one is required to wash for 'netilas yadayim' thus ensuring that there is no safek (doubt)
The Chazon Ish (OC 25:8) writes that in this scenario, one would have to wash again with a beracha
Rabbi Kaganoff has a wonderful article discussing the different reasons for washing. Washing before Davening isn't the same as washing before eating bread.