The Gemara in Eiruvin 63a,b learns that one is not allowed to paskin a halachah in front of one's Rebbi.
Multiple examples and details are brought. In particular, Elazar haKohen taught the soldiers coming back from the war with Midian the halachos of making utensils kosher when Moshe was standing by (and forgot the law, as is expounded by a midrash). Even though Elazar said respectfully,
and this is the halacha that Hashem said to Moshe
still, he was punished.
My question is, don't we observe a similar effect with Pinchas suggesting to Moshe (before slaying Zimri) that this was the halacha that Moshe himself taught, and Moshe replied that it's fitting therefore that Pinchas himself do the killing.
But what is the difference between Elazar's statement and the one from Pinchas - we see no mention that he was ever punished for paskening in front of Moshe?