Democrats are feckless. When it counts, they always fold. After all, they’re more beholden to donors and lobbyists than they are to their base.

This narrative is so old, so straightforward, and so pleasingly infuriating that it just rolls off the tongue. So when Democrats in Congress struck a compromise with Republicans to reopen the government late on Monday, the despairing headlines immediately took over every left-of-center publication in the country. “Schumer Sells Out the Resistance,” Michelle Goldberg concluded over at the New York Times. “The Democrats Are Losers,” my colleague Osita Nwanevu announced here at Slate. Twitter was no less forgiving: By the end of the evening, #SchumerSellout was trending across the country.

When I sat down to write this article, I assumed that the great minds of Twitter were right. You see, even though my job is to follow public policy pretty closely, there are times when I lose track of what is going on. Monday was such an occasion: It was the first day of the semester, and I spent the whole day printing syllabi, meeting with students, and teaching my introductory sessions. So when I finally got a chance to go online, and read the news, I assumed that all the despairing headlines must be right. My heart sank pondering what concessions Chuck Schumer must have made to draw such righteous anger.

Then I started reading up on the actual details of the deal.

In case you’ve forgotten—I certainly wish I had—Republicans currently hold unified control over the federal government. They were seemingly more than happy to let health insurance for 9 million American children expire indefinitely. And lest we forget, conservatives are much more hostile to central functions of the government—from collecting taxes to ensuring compliance with environmental standards—than liberals. A few weeks ago, it very much looked as though they held all the cards in their hands.

Buoyed by grassroots support, the Democratic leaders in Congress turned the tables. They made it clear that they had two big preconditions for any long-term deal to fund the government. First, children’s health insurance would have to be extended for a substantial period of time. Second, Republicans would have to strike a deal to protect the 900,000 Dreamers who will be at risk of deportation unless Congress offers them a more certain future by the beginning of March.

Listen to the Good Fight podcast:

Monday’s deal is a full victory on the first count. The CHIP program has been extended for six years. Nine million children—a very large share of whom, by the way, are brown or black—will keep access to health care. The moral importance of this accomplishment should be evident to everybody.

The deal is, admittedly, only a partial victory on the second count. Mitch McConnell made a public and detailed promise on the floor of the United States Senate that he would undertake to broker a bipartisan agreement on Deferred Action for Childhood Arrivals. If our politics were minimally sane, we should be able to trust such an unequivocal statement by the Senate majority leader. But since congressional Republicans have, again and again, shown just how little store they set by conventional markers of morality (like, say, the Ninth Commandment), it is perfectly sensible to mistrust McConnell.

The thing that counts is not whether Democrats preserve their purity. It is, rather, whether they accomplish their important goals.

But that just doesn’t mean that we have seen “the Senate Democratic leadership sell the Dreamers out,” as Goldberg argues in the Times. After all, Democrats have only voted to extend funding for the government for another three weeks. Once that time is up, the fate of the Dreamers will not rest in McConnell’s hands any more now than it did a few days ago. For if the Senate majority leader goes back on his word, Democrats will enjoy exactly the same leverage they held until Monday: By withholding their votes, they will be able to shut the government down. And since McConnell’s betrayal will be so blatant, they will find it much easier to put blame for any resulting shutdown squarely on Republican shoulders.

It is tempting to think that passionate partisans are obsessed with winning at any price. But often, the truth is a little more complicated: Though they think of themselves as wanting to win, they actually crave the righteous anger that comes with losing. Convinced that they have been betrayed too many times to count, they start to take as much pleasure in finding an excuse to hate on their traitorous leaders as they do in actually accomplishing their stated goals.

This tendency has long been a dominant feature of the conservative movement. From grassroots anger at congressional “RINOs” in the 1990s to today’s fears among the hosts at Fox News and the headline writers at Breitbart that the party establishment is about to sell Trump voters out, accusations of betrayal have become a constant theme of political discourse on the right. From the point of view of achieving conservative policy goals, the results have been decidedly mixed: On the one hand, Republicans have become ever less willing to strike compromises with Democrats for fear of drawing the anger of their base. But on the other hand, they have resorted to empty grandstanding that has deeply damaged the country without actually doing much to turn their agenda into reality.

The left should be very careful not to fall in the same trap. The thing that counts is not whether Democrats preserve their purity by refusing to strike a deal with the Republicans, nor even whether they look like they’re winning. It is, rather, whether they accomplish their important goals.

By any reasonable measure, Monday’s deal was, on that count, a real step in the right direction.

Nine million kids will be able to keep their health insurance. And while it is a crying shame that 900,000 Dreamers still have to live in fear of what the future might hold, Schumer and his much-maligned troops have protected their power to fight for their fate a few short weeks from now.

The conventional wisdom on the left has quickly become that this doesn’t matter because congressional Democrats will never have the guts to stand up for the dreamers. Based on their performance over the past year—and especially over the past days—I’m willing to take a bet that they will.