http://revach.net/article.php?id=4945

Section: Parshas HaShavua   Category: Quick Vort
Parshas Mishpatim: Brisker Rov - When A Position Is Acquired By Yerusha

"Elokim Lo Sikalel V'Nasi B'Amcha Lo Sa'or; Do not revile a judge, and a prince in your nation do not curse." (Mishpatim 22:27)  Chazal explain that the reason it says, "Amcha--In your nation," is because the issur applies when the Nasi does Maaseh Amcha, he behaves according to the Torah. If he does not, then he is not part of the issur of cursing a Nasi. If so why does it only say, "Amcha," by the Nasi and not by the Dayan in the beginning of the pasuk?

The Shulchan Gavoa brings from the Brisker Rov that a Dayan is appointed based on merit. There is no doubt that he is good Jew and does Maaseh Amcha. The Nesius on the other hand comes through Yerusha, and is not entirely earned by the righteousness of the Nasi. Therefore, it is very possible that he is not a good person, and in that case the Torah excludes him from the issur.