On Tuesday, the Department of Justice issued its final rule banning “bump stocks”—accessories that allow semi-automatic rifles to fire like fully automated rifles—throughout the country. That same day, a group of Second Amendment organizations filed a lawsuit challenging the rule’s legality. The plaintiffs raised a number of predictable claims, alleging that the policy exceeds the executive branch’s authority and infringes upon the right to bear arms. But their first and central argument is a direct attack on Trump’s DOJ: They argue that acting Attorney General Matthew Whitaker was appointed illegally, rendering the bump stock ban that Whitaker authorized null and void.

President Donald Trump has pushed a bump stock ban since the 2017 Las Vegas massacre, when a shooter used bump stocks to kill 58 people and injure more than 400 in the most deadly modern mass shooting in U.S. history. Under President Barack Obama, the Bureau of Alcohol, Tobacco, Firearms, and Explosives twice found that bump stocks could not be regulated under a federal law that bans machine guns, since they contain no moving parts. Trump ordered the attorney general—at the time, Jeff Sessions—to reconsider this conclusion.

Now the Justice Department has amended federal regulations to clarify that bump stocks do, indeed, fall within the federal definition of a machine gun, and are therefore illegal. Under federal law, a machine gun is “any weapon which shoots … automatically more than one shot, without manual reloading, by a single function of the trigger.” Any part designed “for use in converting a weapon into a machinegun” is also prohibited. The DOJ held that bump stocks fall within this definition because they “allow a shooter of a semiautomatic firearm to initiate a continuous firing cycle with a single pull of the trigger.” In short, they allow rifles to function like machine guns—precisely what the law forbids. Owners of these accessories have 90 days from Tuesday to surrender or destroy them.

Gun rights activists insist that bump stocks don’t fall under the federal ban within the text of the law because they do not allow a firearm to fire more than one shot “by a single function of the trigger.” Rather, these devices harness a rifle’s recoil energy to make the trigger automatically re-engage (or “bump”) against the shooter’s finger. So a shooter need only pull the trigger once to fire multiple rounds—but the trigger itself will automatically re-engage to keep shooting. The dispute here, then, is whether “a single function of the trigger” can be reasonably interpreted as a single pull of the trigger.

President Donald Trump has pushed a bump stock ban since the 2017 Las Vegas massacre.

That’s a tricky question. Because law is ambiguous—it does not define “function”—the courts are probably obligated to defer to the DOJ’s interpretation, which is certainly plausible. In their lawsuit, however, the Civil Rights Defense Firm, the Madison Society Foundation, and the Firearms Policy Coalition and Foundation argue that it is “arbitrary and capricious,” a botched reading of the relevant statute. They also make a range of constitutional claims, alleging that the rule violates the Second Amendment, the Fifth Amendment, the Ex Post Facto Clause, and the Contracts Clause.

These constitutional claims are frivolous and will be waved away by the courts. The government is allowed to criminalize accessories that allow a shooter to slaughter hundreds of people in a matter of minutes; its machine gun ban has been upheld by the courts. The government can ban and seize a dangerous item without compensating the owner. And it can outlaw weapons without a grandfather clause that allows current owners to keep their devices.

But the plaintiffs’ case against Whitaker cannot be so easily dismissed. They argue—correctly, in my view and the view of many legal scholars—that the federal statute that controls succession at the DOJ does not permit Trump to appoint Whitaker as acting attorney general. (If the law did allow Trump to elevate Whitaker without Senate confirmation, it would likely be unconstitutional.) Instead, this statute clarifies that Deputy Attorney General Rod Rosenstein should be considered the acting attorney general. Accordingly, the plaintiffs write, “Whitaker is unable to lawfully perform the duties and responsibilities of Attorney General” and “lacks the authority to sign the Final Rule as Attorney General.” As a result, “the Final Rule must be struck down as invalidly enacted.”

This argument is not wrong—although if a court agreed, the solution would be simple: have Rosenstein sign the rule. Still, this attack on the acting attorney general’s authority illustrates what an unforced error the Whitaker appointment was. A bunch of plaintiffs, from senators to asylum-seekers, have already challenged Whitaker’s authority. Now even gun rights groups, a longstanding ally of the president, are exploiting his legally dubious elevation in court. As long as he remains the ostensible head of the Justice Department, plaintiffs will seize upon his shaky claim of authority to pursue their goals. (Notably, the National Rifle Association did not file suit against the bump stock ban; perhaps the group was hesitant to buck the president in whom it is so heavily invested.)

Whitaker—who, the Washington Post reported Thursday, will not recuse himself from overseeing special counsel Robert Mueller’s investigation, overruling the counsel of ethics officials—may not be in this tenuous position much longer. Trump has nominated William Barr to replace him, and Barr’s confirmation would end the uncertainty over who, legally, is in charge of the DOJ. Until then, expect the barrage of lawsuits over Whitaker to continue, even from conservatives who might find themselves irked by any given new Trump policy. Gun rights groups: Welcome to the resistance.