I can't be the only one who has had this experience. Admit it, it's happened to you too.
You're saying "יעלה ויבוא" from memory in the Amidah or birkat hamazon on some holiday or another, and you get to the end, "כי א-ל מלך חנון ורחום אתה...", and then instead of resuming where you left off, you go on autopilot and continue with "...ושמור צאתנו ובואנו".
So anyway, a variant of this happened to me today. They were using a tune for the musaf kedushah that was the same tune that I used for "א-ל אדון" the last time I led shacharit. So we sang "כבודו מלא עולם" to this tune, and then I almost continued "...דעת ותבונה".