If a person uses the restroom before washing Netilat Yadayim in the morning, he washes immediately after performing his bodily functions, and must then recite two Berachot – "Al Netilat Yadayim" over the hand-washing, and then Asher Yasar over using the restroom.
It could happen that the person might intend to recite "Al Netilat Yadayim," but he instead says Asher Yasar. Meaning, he recites "Baruch Ata Hashem Elokenu Melech Ha'olam" with the intention of reciting the Beracha over the hand-washing, but, since he had just left the restroom – and he is not very focused, as he had just woken up – he mindlessly continues with Asher Yasar.
The Yalkut Yosef writes that the person in this case should complete the Beracha of Asher Yasar, and then recite the Beracha of "Al Netilat Yadayim."
Rav Yisrael Bitan disagrees. He notes the Rambam's position that if one had the intention while reciting "Baruch Ata Hashem Elokenu Melech Ha'olam" to recite a certain Beracha, but then mistakenly continued with a different Beracha, he is considered as having recited the Beracha he initially intended. For example, if a person picked up a glass of beer, and recited "Baruch Ata…" with the intention of concluding "She'ha'kol Niheya Bi'dbaro," then even if he mistakenly concluded "Boreh Peri Ha'gefen," he has fulfilled his obligation and may drink the beer. According to the Rambam, the person's intention at the time he said the words "Baruch Ata…Ha'olam" defines the Beracha even if he ended up reciting the wrong conclusion. Hence, out of concern for this ruling of the Rambam, if one mistakenly continued Asher Yasar after beginning the Beracha with the intention of reciting "Al Netilat Yadayim," he should not repeat "Al Netilat Yadayim," since according to the Rambam, he fulfilled the requirement to recite this Beracha.
Rav Bitan draws a parallel to the case of a person reciting the morning blessings, who intends to say "Poke'ah Ivrim" but mistakenly recites the next blessing – "Matir Asurim." According to the Rambam, he is considered to have recited "Poke'ah Ivrim," since this was his intent when he began the Beracha. Others disagree, and so Hacham Bension Abba Shaul (Jerusalem, 1924-1998) ruled that the person should then recite neither "Poke'ah Ivrim" nor "Matir Asurim." Since it is uncertain which of these two Berachot he is considered to have recited – and thus which Beracha he still needs to recite – we apply the famous principle of "Safek Berachot Le'hakel," meaning, that we do not recite a Beracha when its necessity is in doubt. In the case under discussion, too, the individual does not recite "Al Netilat Yadayim," since according to the Rambam this Beracha is not required.
Summary: If a person intends to recite the Beracha of "Al Netilat Yadayim," but after reaching "Melech Ha'olam" he mindlessly recites the Beracha of Asher Yasar, he does not then recite "Al Netilat Yadayim."

