More than a year into his administration, President Trump still won’t let go of primary-campaign grudges against foreign policy-minded Republicans who want to serve. And as qualified and patriotic Republicans watch how Trump treats those who do sign up, fewer and fewer are willing to come aboard. That dynamic hurts both Trump and our national security.

There are plenty of good jobs available. National security adviser John Bolton opened several opportunities in just the past few days — by cleaning house at the top of the National Security Council staff. Mike Pompeo, the nominee to become secretary of state, promised senators at his confirmation hearing last week that he would fill dozens of vacant diplomatic posts as soon as possible. Even at the Pentagon, plenty of top positions are still open.

Some of the vacancies are because of the slow confirmation process. Some are the result of infighting within the administration. But during interviews with administration officials and outside Republicans, a theme emerges: This White House makes it too difficult to serve, and treats those who do shabbily.

The latest example is the case of Jon Lerner, a deputy to Nikki Haley, the U.S. ambassador to the United Nations. After months of searching, Vice President Pence asked Lerner to serve as his new national security adviser, splitting his time between Pence and Haley. The somewhat unusual arrangement made sense because Lerner has connections to both teams. Since he was already serving as a national security official in the Trump administration, he should have been a controversy-free choice.

I first reported Lerner’s new gig on Thursday evening. On Sunday evening, Axios reported Trump was “furious” when he found out about Pence tapping Lerner. Apparently, Trump was told Lerner had been involved in crafting anti-Trump ads for the Club for Growth and other GOP donors during the primaries. Reportedly, the vice president called Trump from Peru and successfully reassured him that Lerner was on the team.

But after the Axios story came out, the Internet outrage began. Fox Business Network anchor Lou Dobbs tweeted: “Pence Needs to Reverse This Now: Pence, Kelly and Haley Promote a Never Trumper — Pence’s Outrageous National Security Appointment,” with a link to the Axios piece.

Before the night was over, Pence’s office said Lerner was “withdrawing from coming on board” as Pence’s national security adviser, though he would remain in his role working for Haley. Lerner did not want to be a distraction, officials said, and the vice president’s team wanted to avoid any drama.

According to Maggie Haberman of the New York Times, the Lerner fiasco was partially due to miscommunication inside the White House. Chief of Staff John F. Kelly was informed about Lerner’s selection, but not about his previous anti-Trump advocacy.

Around Washington, Republicans saw it as the latest example of Trump prioritizing political purity over national security staffing needs.

“This is a person who, whatever he said in 2016, has loyally served the administration for 15 months,” said one former senior GOP foreign policy official. “By reversing a formal decision, it makes it look like the vice president can’t choose his own staff.”

That spells trouble for Pompeo and Bolton as well, as they both work to compile lists of Republican foreign policy hands who can pass vetting and are willing to sign on. “The message to a generation of Republicans who are between 30 and 50 years of age is that there is no place for them in this administration,” the former official said.

It doesn’t take past “Never Trump” activities to warrant shoddy treatment. Now former homeland security adviser Tom Bossert was one of the earliest and most loyal Trump White House officials. He went out of his way to defend Trump, even after the troubling events of last summer in Charlottesville.

But on April 10, Bossert was given no warning before being asked to resign, three administration officials told me. What particularly irked many inside the White House, two officials told me, was that Kelly had pledged during multiple staff meetings that there would be no staff purges as Bolton and National Economic Council chairman Larry Kudlow came on board. But that didn’t prevent Bolton from giving Bossert a pink slip.

“Kelly made this overarching promise that no heads were going to roll,” a senior White House official said. A White House spokesperson didn’t respond to a request for comment.

“It’s disrespectful,” the official said about Bossert’s dismissal. “It harms morale and it makes it more difficult to hire people when a good guy gets treated that way.”

Former national security adviser H.R. McMaster was supposed to be the example of the official who could leave the Trump administration with his dignity intact. There was a succession plan that included giving him a fourth star, but Trump discarded it and McMaster resigned ahead of schedule.

Before that, Secretary of State Rex Tillerson was told he was fired while sitting on the toilet during a trip to Africa, a humiliating detail that Kelly himself leaked to White House reporters.

Former Bush official Victor Cha went through months of vetting before the White House decided not to nominate him to be ambassador to South Korea, without telling him why they changed their mind. Former Bush official Elliott Abrams was offered the job of deputy secretary of state, but Trump pulled the rug out at the last minute. The list goes on and on.

Even in this environment, there are many Republican foreign policy hands eager to serve and willing to buy into Trump’s agenda, despite the risks. Many are in various stages of security vetting and have no idea where they stand. Some have been blocked by the White House personnel office, which is still scouring every candidate’s social media for signs of Never Trump activity.

In Bolton and Pompeo, Trump has chosen experienced professionals, but he is setting them up for failure if they are not allowed to make their departments work. The president and the White House must stop seeing the foreign policy establishment as an enemy, do away with its purity tests and black lists, and get down to the business of filling the ranks — both in the interest of advancing Trump’s agenda and for the sake of the country.