Washington Republicans have put the fiasco of Alabama’s special election behind them, but their electoral nightmare may just be beginning.

Roy Moore’s stunning defeat Tuesday night was met with quiet sighs of relief throughout the GOP establishment, where the culture-warring ex-judge and accused child abuser was widely regarded as radioactive. Yet even as Moore’s political obituaries were being written, party strategists were bracing for the army of Moore-like insurgents they expect to flood next year’s Republican primaries.

Indeed, Breitbart News chief Steve Bannon has already pledged to field challengers for every incumbent Republican senator up for reelection next year (with the exception of Ted Cruz). And even if Bannon fails to deliver on his threat, many in the GOP worry that experienced, fully-vetted candidates are going to struggle to beat back a wave of rough-edged Trump imitators who lean into the white identity politics that the president ran on in 2016.

While Republicans in the political class will no doubt cite Moore’s loss as proof that their party needs to nominate stronger, more mainstream candidates next year, it’s far from certain that primary voters on the ground will heed such pleas from the swamp.  

"What’s the lesson here?” one GOP consultant asked me on the eve of the Alabama election, on condition of anonymity so as to speak with candor. “Don't entrust our nominations to loose cannons? We’ve been fighting this battle since 2010 and no one learns anything from it. Did we not learn that from Christine O’Donnell? Did we not learn that from Sharron Angle?"

Indeed, this is not the first time in recent memory that Republicans have coughed up an easy win by handing their nomination to a loose cannon. While the Tea Party wave of 2010 swept dozens of GOP lawmakers into office—including some future party stars like Senators Marco Rubio and Rand Paul—it also produced several decidedly terrible candidates who lost races that were well within reach for the Republican Party.

Angle, for example, waged a strange and reckless campaign in Nevada and ultimately blew a chance to unseat Democratic Senator Harry Reid. Her candidacy would be remembered primarily for her claim—instantly debunked, and nationally ridiculed—that the threat of encroaching Sharia Law constituted a “militant terrorist situation” in the cities of Dearborn, Michigan, and Frankford, Texas. Meanwhile, O’Donnell (who is most famous for her “I am not a witch” campaign ad) defeated a former governor and nine-term congressman in the Republican primary, and then got blown out in the general.

The fear that Republicans could see a replay of the worst Tea Party primary upsets is compounded by the fact that next year’s electoral landscape looks much tougher than it was in 2010.

“In 2018, we’re going to be playing a lot of defense,” said Alex Conant, a Republican strategist and former longtime Rubio adviser. “To the extent that we’re defending open seats with flawed candidates, we’re going to see more results like we had last night. Going on offense in 2018 is going to require extraordinary, battle-tested candidates.”

But of course, the dynamics that made it possible for Moore to win the Republican primary in Alabama are unlikely to change by 2018—and the consequences of the GOP nominating a slate of toxic standard-bearers could reverberate well beyond the midterms.

“You are going to have more fringe candidates continue to run,” said Nick Everhart, a Repubican consultant based in Ohio. “And nationally, you’ll inherit their problems as a party unless you distance yourself and say no. That’s the question I have: At what point does the national party have to say, ‘Just because you win the nomination doesn’t make you ours’?”

Everhart, who made his name in political circles by advising Tea Party-aligned outsider candidates, acknowledged that such a move would only deepen grassroots anger. “Part of the problem is we’ve trained our base to only respond to very specific messaging. We’ve fine-tuned what these people need to hear.”

In any case, he said, the institutional GOP can only do so much to control the quality of its candidates: “You can’t stop those people from filing.” And when any primary field gets too big, the electorate can easily fracture to the point where the noisiest firebrand on the ballot wins.

“There’s no remedy for this,” Everhart concluded. “There’s no magic wand or way to fix it.”