As the confirmation of Justice Brett Kavanaugh made its painful way through the Senate, a number of liberals began to make an important discovery: The U.S. Senate is undemocratic. Small states get the same quantity of senators as large states. It’s often added that the ratio of population between the largest and the smallest states was “only” 12 to 1 when the Constitution was first adopted. Now it is 68 to 1. (California to Wyoming, in case you’re counting.)

Dissatisfaction with this aspect of constitutional design fits in with leftover frustration over the Electoral College in 2016. Together these nonmajoritarian flaws are breeding demands for change. Something must be done, the critics say, to avoid rendering the Supreme Court, presidency and perhaps the entire Constitution illegitimate.

There’s nothing incorrect about the objections. The design of the Senate is anti-democratic. In fact, it’s so undemocratic that it would be unconstitutional if it were used by the states. After the Supreme Court adopted the one-person, one-vote principle in the 1960s, states were obligated to apply a proportional method for representation of their own senatorial districts.

However, the equal protection clause of the Constitution doesn’t apply to the Senate itself. That’s because the design of the Senate is baked into the Constitution — and it was baked in long before the equal protection clause was even imagined.

But here’s the thing: The Constitution was designed precisely so that no one would be able to do anything about the undemocratic Senate. Almost uniquely among constitutional provisions, and unlike the Electoral College, the assignment of two senators to every state regardless of population is essentially unamendable. The Constitution specifically says that states can only lose their Senate representation with their consent. That’s never going to happen.

How can I say that with such confidence? Because the fight over the undemocratic Senate was already the central issue in the constitutional convention in the long, hot summer of 1787 in Philadelphia. The nonrepresentative design was a source of outrage and profound frustration to James Madison, the primary architect of the Constitution, and the other representatives of large states like New York, Pennsylvania and Virginia.

The small states made equal Senate representation into the linchpin of their willingness to join the Constitution. They anticipated staying small. They anticipated future efforts to strip them of their Senate representation. And they made sure those would never succeed.

To understand what happened, you have to start with Madison’s initial constitutional blueprint, which was introduced in the first few days of the convention and dubbed (fittingly enough) “the Virginia plan.” Madison called for two houses in the legislature. He assumed that both would be allocated proportionately according to the population of the states.

Almost from the beginning, small-state delegates hinted that they wouldn’t accept proportional representation in the Senate. Madison and the other large-state delegates didn’t take the objections seriously. As Madison saw it, the small states were weak and would have no choice but to accept what the large states imposed on them.

Realizing that the large states weren’t willing to accept their (weak) argument for equal Senate representation, the small states played the only card they had: They staged a walkout. Their position was simple. Unless they got equal representation in the Senate, they would ensure the failure of the convention, and damn the consequences.

Madison was beside himself. But there was nothing he could do, and he knew it. Among other problems, the system for voting in the convention was by state, not by size. That was a throwback to the Articles of Confederation, which treated the states as equal sovereigns regardless of size and gave them equal votes in the Congress. Faced with small-state intransigence, Madison and the big states compromised. It was compromise or no Constitution. They didn’t like the arrangement that emerged. But they had to live with it.

As a result, the only way we could change the Senate today would be to trash the Constitution and start from scratch. Even a new convention might not solve the problem. After all, how would we vote in such a convention? You can be sure the small states would propose voting by state — like in 1787.

The takeaway is that whenever you think about changing the Constitution, you always have to ask: Change it to what? What’s the realistic alternative? Compromise is painful, and often immoral. And without it, there would be no Constitution.

Noah Feldman is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His books include “The Three Lives of James Madison: Genius, Partisan, President.”