Aharon's sons were killed because they did not show Kavod to their Rav by not asking Moshe Rabeinu before bringing the fire. The Gemara says that they could not have been killed for entering the Kodesh ha'Kodoshim without Ketores because they had not been warned beforehand.
But we do not find that they were warned beforehand not to pass a ruling without asking their Rav, so how could they be killed because of that?
It seems to me that Bnei Yisrael had indeed been warned that they must only make rulings according to Moshe Rabeinu. This warning was on Mount Sinai itself. RAMBAM HILCHOS YESODEI HATORAH 8:1 explains that Yisrael did not believe in Moshe because of the miracles he worked but rather because of what they saw and heard at Har Sinai that Hash-m said "Moshe, Moshe. Go and tell them such and such". Rambam cites Shemos 19:9 that Hash-m said to Moshe "And they will believe in you for eternity". Since they believed in the fact that Moshe received the Torah from Hash-m it followed automatically that they could not pass their own rulings without first consulting Moshe and this is why Nadav and Avihu were punished for bringing their strange fire about which Hash-m had not commanded them (see Vayikra 10:1).
KOL TUV
D. Bloom
I don't think Moshe Kaplan made the question clear. What he meant by warned was what we call "azhara", the warning that the penalty was death. The implication of Yoma 53 is that the death penalty of entering the Kodesh hadn't been stated yet (as opposed to the prohibition which had been stated), so that couldn't be the cause of their death.
Moshe Perkal
The Gemara says that they could not have died on account of their being Makriv Ketores without ma'Aleh Ashan because the Onesh had not yet been said. (Although it was told to Moshe at Sinai, it seems that this is not sufficient.)
Perhaps the Chiyuv for Moreh Halachah bi'Fnei Rabo is different than the Chiyuv for being Maktir Ketores without ma'Aleh Ashan. This must be true, because there is no Makor (to the best of my knowledge) for the Isur or Onesh of Moreh Halachah bi'Fnei Rabo. Rather it is a matter of Derech Eretz, which a person is expected to deduce from his own common sense. Rashi in Eruvin 62b explains that it is considered a Chutzpah to rule in front of one's Rebbi. It is also Mashma like that in Eruvin 63a. This would also explain why there is an Isur of Moreh Halachah bi'Fnei Rabo even for someone who is not one's Rebbi if he was the Gadol ha'Dor or the Talmid had come to learn from him even if he had not yet learnt (see Tosfos Berachos 31b). It would also explain why Shmuel was Chayav Misah for being Moreh Halachah in front of Eli even though he was still a Katan (see Maharsha Berachos 31b and our "Discuss the Daf" mailings there for another approach), and why Chanah was able to plead with Eli to grant Shmuel clemency (ibid.). On the other hand, the Isur of being Maktir Ketores without ma'Aleh Ashan is not a Sevara and one is not culpable for transgressing the Isur before it comes into effect.
Dov Freedman
I have found a statement of RA'AVAD that answers the question. In his commentary to TORAS KOHANIM at the beginning of PARSHAS ACHAREI MOS #1, Ra'avad explains that Rabbi Eliezer maintains that Nadav and Avihu died because they passed a Halachic ruling in the place of Moshe their teacher. Ra'avad writes that the punishment for this transgression is not explicitly stated in the Torah but they possessed a Kabalah (tradition) that the punishment for it is death. Ra'avad adds that Rabbi Eliezer maintains that Nadav and Avihu would not have been punished for this unless the punishment (Onesh) was known, but merely to know that there was an "Azharah" (warning) against it would not be sufficient.
Now we can understand our Gemara. The Azharah against Ketores Chasera was known before Nadav and Avihu entered but the Onesh was not. Therefore it could not be that they died for this transgression. However, there was already a Kabalah concerning both the Azharah and Onesh for "Moreh Halachah bi'Fnei Rabo" so it must be that Nadav and Avihu died for transgressing this.
I can suggest a different way of explaining why Nadav and Avihu died because they passed a Halachic ruling without permission from their teacher Moshe. This is because of what Chazal say that "Derech Eretz came before the Torah" (see Midrash Rabbah Vayikra 9:3 where this is learnt from Bereishis 3:24- "to guard the way-"Derech"- of the tree of life" which teaches that Derech i.e. Derech Eretz, preceeded the Etz Chaim, i.e. the Torah. See also Tana de'Bei Eliyahu 1:1).
RASHI ERUVIN 62b DH MAHU writes that the reason one must not make rulings in the presence of one's teacher is because this is a Chutzpa i.e. a contradiction to Derech Eretz- to reasonable, respectful behavior. Therefore, even if they had not been commanded specifically about this, Nadav and Avihu should have known on their own not to do this. The reason that they were given such a severe punishment of death for this can be understood by what the Gemara in Bava Kama 50a states that Hash-m is particular with his close ones (see RASHI DH IM that this refers to the Tzadikim) even to a hairsbreadth. Therefore, even though people on a lower level would not have been punished so severely, nevertheless a higher standard was expected from Aharon's sons (see Rashi to Vayikra 10:3 that Nadav and Avihu were in fact greater even than Moshe and Aharon).
I saw in KOL ELIYAHU by RAV YEHUDA TZADKA zt'l, on the Torah, PARSHAS SHEMINI (this was cited recently in ISH LE'REY'EIHU, one of the Parsha sheets, on Parshas Shoftim) an explanation of why someone who rules in the presence of his teacher receives such a severe punishment. This is because the very foundation of Am Yisrael is that the Shechinah rests upon the elderly Rabbis who are closer to the giving of the Torah on Mount Sinai and who therefore know how to reach the truth of the Torah. This is the difference between Yisrael and the nations of the world. The wisdom of the nations is developed by themselves and therefore they achieve more progress as the generations proceed, because each generation builds on and adds to the research of their predecessors, so their younger academics are more advanced than the elders. In contrast, the elders of Am Yisrael are wiser than the younger because they are closer to the source of the Torah: Ma'amad Har Sinai.
Therefore since the death punishment for omitting "Ma'aleh Ashan" had not been stated before Nadav and Avihu died, they could not have known that the punishment would be so severe. In contrast they could have been expected to know that ignoring their teacher Moshe was something they would be worthy to die for.
KESIVAH VE'CHASIMAH TOVAH
D. Bloom