On Wednesday, in an Office of Legal Counsel memo, the Justice Department made its argument for why Matthew Whitaker’s appointment as acting attorney general is legal. Here’s that argument, in a nutshell: The Constitution’s text doesn’t really matter; the Framers didn’t mean what they said; and an acting attorney general who served without Senate confirmation for six days in 1866 provides the historical precedent to justify Whitaker’s claim to the office.

In other words, Matthew Whitaker appears to be in serious trouble.

The memo was prepared by Steven Engel, assistant attorney general for the Office of Legal Counsel. Engel is neither a hack nor a Donald Trump crony. But his job is to help the attorney general provide legal advice to the president, and it’s no surprise that he chose to tell his new boss he isn’t breaking the law. What is surprising is just how weak—how reliant on a “living constitution,” how riven with ambiguity and error—the OLC memo is. If this is the best the Trump administration has, it should expect rough sledding in court.

Engel puts forth two main arguments to bolster the legality of Whitaker’s appointment. The first is statutory: Engel claims that the Federal Vacancies Reform Act (FVRA) controls here, rather than the Attorney General Succession Act (AGSA). Are your eyes glazing over already? Don’t worry, this argument is actually straightforward. Both of these laws dictate how the attorney general should be replaced if he leaves office, but they provide different paths. The FVRA says that the president can authorize “an acting official to perform the functions and duties of any office,” and Whitaker, who previously served as Attorney General Jeff Sessions’ chief of staff, seems to qualify. The AGSA, by contrast, says that “the Deputy Attorney General may exercise all the duties of” the attorney general in his absence. That would mean Rod Rosenstein is the true acting AG, and Whitaker is an interloper.

Which law applies? In a motion filed Tuesday, Maryland argued (quite plausibly) that the AGSA takes precedence over the FVRA. Why? Because the FVRA states that it is not the “exclusive means” for filling a vacancy when a different “statutory provision expressly … designates an officer” to step in “temporarily in an acting capacity.” The AGSA does precisely that, assigning the deputy attorney general the “duties” of the attorney general. So, Maryland says, the AGSA should make Rosenstein, not Whitaker, the acting AG.

Engel responds to this claim claiming that the president gets to choose which law to follow. The heart of his argument is that the AGSA “cross-references” the FVRA, citing a provision of the statute “providing for the designation of an acting officer.” This cross-reference, Engel writes, signals that the laws work in tandem. The deputy attorney general “may” fill the AG’s role, or the president can select somebody else.

There is a problem with this reasoning: It is incorrect. The AGSA cannot cross-reference the FVRA because it was passed before the FVRA. Engel asserts that the AGSA was designed to work “in conjunction with” the FVRA, but it was passed decades before. As Fordham law professor and Slate contributor Jed Shugerman noted on Wednesday, you cannot cross-reference a law that did not yet exist.

But there’s a second, deeper problem with Engel’s insistence that the FVRA supersedes that AGSA: If it’s true, then the FVRA has been unlawfully applied. The attorney general, like any Cabinet member, is a “principal officer” in constitutional parlance: He runs a federal agency and answers directly to the president. Under the Constitution’s Appointments Clause, a principal officer must be confirmed by the Senate. Whitaker has not received Senate confirmation for any high-level position in the Justice Department. How, then, can his appointment possibly comport with the Constitution?

Engel’s response rests on a decidedly loose mode of interpretation under which historical practice can override the plain meaning of the Constitution. As Noah Feldman points out in Bloomberg, it’s a tactic typically adopted by liberal justices eager to square rigid constitutional commands with the contemporary realities of a sprawling, messy government. Engel writes that just because the attorney general is a principal officer, “it does not follow that an Acting Attorney General” is, too. He cites a series of examples, from the founding era through today, that involved a government official taking on the duties of a principal officer without Senate confirmation.

Look closer, however, and you’ll see that Engel’s historical evidence isn’t nearly as compelling as he implies. Yes, presidents have repeatedly appointed acting principal officers without the Senate’s “advice and consent.” But many of these officers served on an ad interim basis, meaning they were simply filling in until their bosses returned. And this practice peaked in the 19th century, when obtaining Senate approval was, as a practical matter, much more difficult. (Senators couldn’t exactly fly back to Washington to confirm new Cabinet members.) Let’s get more specific: How many times has a president appointed an individual to serve as acting attorney general, the nation’s chief law enforcement officer, without Senate confirmation? Once, in 1866, when J. Hubley Ashton held the office for six days. That was four years before the Department of Justice’s creation. History hardly provides a slam-dunk case that Whitaker’s appointment—which could stretch beyond 210 days—is legal.

Engel also cites an 1898 Supreme Court decision, United States v. Eaton, to shore up his position. In Eaton, the court permitted the interim appointment of a vice-consul in Thailand without Senate confirmation because the consul got sick. It explained that, due to the “special and temporary conditions”—the consul’s illness and the distance to Thailand—the vice-consul could perform the consul’s duties “for a limited time” and was not “transformed into the superior and permanent official.” Similarly, Engel writes, Whitaker can step into the attorney general’s role until Trump secures a permanent replacement.

But what “special and temporary conditions” exist here? Trump demanded Sessions’ resignation: The attorney general didn’t suddenly fall ill or quit. And there are multiple Senate-approved officers in the Justice Department’s top ranks, including Rosenstein. Why not appoint one of them instead? As John Yoo (John Yoo!) notes in the Atlantic, Alexander Hamilton seemed to anticipate, and oppose, Trump’s shortcut here. Senate confirmation of principal officers, he wrote, “would be an excellent check upon a spirit of favoritism in the President,” preventing his from appointing “unfit characters” due to “personal attachment” or “private inclinations.” Does that sound like anyone we know?

Most conservative lawyers would value the words of Hamilton over the example of J. Hubley Ashton. Justice Clarence Thomas certainly would: He wrote in 2017 that any principal officer must receive Senate confirmation—even if they serve on an “acting” basis. “I do not think,” Thomas scoffed, “the structural protections of the Appointments Clause can be avoided based on such trivial distinctions.” Engel sides with Ashton over Hamilton and Thomas because his job compels it. I highly doubt that a whip-smart, right-leaning attorney like Engel would draw the same conclusion absent the obligations of his current gig.

Maryland has already asked a federal court to rule that Whitaker is acting illegally and Rosenstein must replace him. Its motion stands a good chance of success. Engel has done a fine job marshaling every possible argument to vindicate Trump’s selection, and it’s not his fault that the arguments just aren’t very good. Trump’s OLC did the best it could, but it can’t change the fact that, as a matter of law, Matthew Whitaker is not the acting attorney general.