Despite falling short in four closely watched special elections for seats in Congress, Democrats keep seeing green shoots in lower-level races — and spent Wednesday celebrating a solid victory in the sort of rural Midwestern district that broke away from them in 2016.

Phil Miller, a veterinarian and school board member, easily won Tuesday’s race in a southeastern Iowa legislative district, taking 4,021 votes to Republican Travis Harris’s 3,324. That represented a reversal from 2016, when Trump carried the state’s 82nd House District by 22 points, part of an Iowa landslide that ended Democratic control of the state Senate.

“Republicans should have flipped House District 82 with their hands tied behind their proverbial backs,” wrote Carolyn Fiddler, the political editor of Daily Kos, in a memo to the liberal blog’s readers.

In the year’s 31 special elections for legislative seats, Democrats have now outdone their 2016 performance 24 times. Republicans have flipped control of one seat, in Louisiana; Democrats have whittled away at Republican majorities in New Hampshire, New York and Oklahoma. They fell short of two more wins Tuesday in Missouri, losing by four points in the 50th House District (which had been targeted by the Bernie Sanders-founded Our Revolution) and by a 2-to-1 rout in the 28th Senate District. Even that result represented a climb from the 3-to-1 vote against Hillary Clinton in the district.

The average Democratic increase in vote shares in special elections has been in the high single digits, just where the party would need to be to hold off Republican Senate gains and win the House in 2018. But in the short term, the Iowa race excited liberals for another reason — the failure of an “identity politics” attack on Miller. In a spot that ran over the race’s final days, the Republican Party of Iowa attacked Miller for his role on a school board that allowed students to use the bathrooms that comported with their gender identity, even if it differed from their gender at birth.

“We can’t afford to trust his poor judgment,” said the ad’s narrator, after images of Nancy Pelosi and Clinton flashed on screen.