For complicated and uninteresting reasons, I was planning to eat the real matza afterwards anyway, so my first bracha covered it assuming it was a valid bracha.
It seems to be the main reason of YLOR. This rule is learned by Tosfot from the Yerushalmi. Here is a snippet from Tosfot masechet Brachot daf 39a:
ועוד יש בירושלמי היכא דבריך אתורמוסא למיכליה ונפל מידיה ושקל אחרינא בעי ברוכי זמנא אחריתי ופריך מאי שנא מאמת המים פירוש דמברך לשתות והני אזלי והני אחריני נינהו וא''צ לברך פעם אחרת ומשני הכא הוה דעתו מתחלה לזה שהיה יודע שילכו להן אבל בתורמוסא לא ידע שיפלו מידו ויאמר ברוך שם כבוד מלכותו לעולם ועד משום דהוה ברכה לבטלה וכן נכון לומר על כל ברכה לבטלה בשכמל''ו:
There is a case in Talmud Yerushalmi: A man blessed on a lupin (in way to eat it, and one lupin and no more) and the lupin dropped from his hand. So he took an other lupin. The rule is that he need to bless again. The Gemara asked: In what is it different from a water stream? (the water consumed was not present at the time of the blessing, it comes later by the stream.) The answer is that from the outset, he had intention to drink the water which will come later. FRom the begining he was known that he will to drink the "next" water. But in the case of the lupin he had no idea he would eating an other lupin. Se he need to say Baruch Shem Kevod Malchuto Leolam Vaed for the first blessing, it was a Bracha Levatala (wast blessing).
In your case you was planning to eat the real matsa. It is the case of Amat hamayim (stream water). Your case is resolved.
But the question is about something you don't eat.
This case is discussed, concerning Birkat Hamazon in Masechet Brachot (first Mishna from the 7st chapter and Gemara 47ab). I am not sure, but because it seems that someone has eating Dmay, somewhat that he cannot eating Lechatechilla, we can say zimun together with him. But if he eat Tevel, an absolutely prohibited food, we cannot say zimun.
So the matsa with eggs is better than Demay and a Bracha for such a matsa is good. If the Gemara stated this for brachot Mideorayta, BHM, a fortiori for first blessing which is derabanan1
You reported a Machloket from a answer concerning a person who already eat forbidden food, concerning Bracha Acharona. May be that you are right, but may be that in your case the both opinions cited there will agree because here the food (Matsa with eggs) is not really forbidden.
1I mean that the next food needs blessing before eating Miderabanane only