The chairman of the House Intelligence Committee, Devin Nunes, is not particularly concerned by the fact that former National Security Adviser Michael Flynn discussed sanctions against Russia with the Russian ambassador during the transition. Nor is Nunes worried about evidence that Paul Manafort and other Trump aides were in frequent contact with Russian intelligence officials during the presidential campaign. But he is shocked—shocked—that the communications of Trumps’ confidantes were obtained by U.S. intelligence agencies. “The big problem I see here,” he huffed, “is that you have an American citizen who had his phone calls recorded.”

Either Nunes is being disingenuous, or he is suffering from catastrophic memory loss. On multiple occasions in the past decade, Nunes, along with the other Republican lawmakers now complaining about the surveillance, has enthusiastically backed the law that allows the warrantless domestic collection of millions of Americans’ calls and emails each year.

For decades, such surveillance was prohibited under the 1978 Foreign Intelligence Surveillance Act. After the Church Committee revealed a sordid three-decade history of intelligence abuses, Congress enacted FISA to protect Americans from warrantless surveillance masquerading as “foreign intelligence” collection. The law required the government, when acting inside the United States, to obtain permission from a secret court before intercepting communications between foreigners and Americans. The FISA Court could approve the surveillance only if the government showed probable cause that the target was a foreign power or its agent—such as a foreign government official, or an American conducting espionage for another nation.

After Sept. 11, the law underwent a sea change. In Section 702 of the FISA Amendments Act of 2008—legislation supported by Nunes, along with 187 other House Republicans and 105 Democrats—Congress gutted FISA’s key protections in order to legalize the Bush administration’s warrantless wiretapping program. Congress reauthorized the law in 2012, again with Nunes’ support.

Section 702 allows the government to spy on calls and emails between Americans and foreign targets without any individualized court order. The target need not be a foreign power or its agent, and no suspicion of wrongdoing is required. The government just has to submit a yearly certification that at least one of its purposes is to collect “foreign intelligence,” broadly defined to include almost anything relating to foreign affairs. And it must certify that its interest lies in the foreign targets, not the Americans with whom they communicate.

Under this permissive scheme, the National Security Agency collects at least 250 million internet communications flowing into and out of the United States each year. If only 10 percent of these communications involved Americans—almost surely a conservative estimate—the NSA would still be collecting tens of millions of Americans’ emails.

As the Wall Street Journal pointed out Tuesday, Section 702 requires the government to “minimize” the retention and sharing of information about Americans that gets caught up in the net of warrantless surveillance. But Congress left a good deal of wiggle room in that requirement, suggesting vaguely that it should be balanced against foreign intelligence and law enforcement needs. Agencies have aggressively exploited that license, developing minimization procedures so riddled with exceptions that the rule itself seems like an afterthought.

Nonetheless, until recently, the government could still maintain (however implausibly) that the surveillance of Americans’ communications was merely “incidental.” The exceptions to minimization, while capacious, would kick in only if the government stumbled across certain types of information in the course of investigating foreign targets. In 2011, the government dropped the fig leaf. Agencies revised their minimization procedures to allow agencies to comb through warrantlessly collected data in search of particular Americans’ communications.

This practice is known as back-door searches, for obvious reasons. The Fourth Amendment requires the government to obtain a warrant in order to conduct surveillance of an American target. The constitutionality of Section 702 thus depends on the target being a foreigner overseas—which is why the government cannot collect the communications unless it certifies that it has no interest in any particular, known American.

To acquire the data on that premise, and then to search it for the communications of particular, known Americans, is a bait-and-switch that creates a potentially massive end run around the Fourth Amendment. According to an independent oversight board that reviewed the operation of Section 702 in 2014, the FBI routinely searches Section 702 data for evidence in ordinary domestic criminal cases even when agents lack sufficient evidence to open a full investigation, let alone obtain a warrant.

So where does the surveillance of Flynn and other Trump aides fit in? Is this the kind of surveillance that civil liberties activists have been protesting since long before the Snowden leaks?

Although the FISA regime has morphed into an everyday law enforcement tool, what took place here was—at least in the beginning—core foreign intelligence surveillance. The targets were an ambassador and intelligence officials of a hostile nation, and the government sought information about that nation’s covert attempt to influence the American election. Had the government applied to the FISA Court for a surveillance order under the 1978 version of FISA, the court would have granted the order without pausing to blink.

Nor is there any plausible argument that the government violated minimization procedures by not redacting the Trump aides’ identities or their portion of the communications. There are too many exceptions in agencies’ minimization procedures, and some are overly broad. But it is difficult to quarrel with the exception for information about Americans that is “necessary to understand the foreign intelligence information.” Without question, the Russian officials’ communications could not properly be understood absent the identities of the recipients.

At some point, however, it is clear that Trump aides themselves became targets of FBI interest—and that’s where the law’s effective license to spy on Americans comes in. According to the New York Times, after the NSA captured the communications between Russian officials and Trump associates “as part of routine foreign surveillance,” the FBI asked the NSA to step up its surveillance of the Russian operatives and began rummaging through troves of already-collected data. It seems a fair bet that agents exploited the “back-door search” loophole to look for communications to and from the Trump camp—the kind of surveillance that would have required a warrant before 2011.

Moreover, the Washington Post reports that the FBI “did not have enough evidence to obtain a warrant for a wiretap of Mr. Manafort’s communications, but it had the N.S.A. scrutinize the communications of Ukrainian officials he had met.” This begins to sound a lot like “reverse targeting”—i.e., collecting communications between an American and a nominal foreign “target” when the true target is the American. On paper, the law prohibits reverse targeting; in practice, there is little to stop it.

Some lawmakers have tried to rein in Section 702 and restore FISA’s original focus on foreign threats. In 2016, Reps. Thomas Massie and Zoe Lofgren introduced an amendment that would have prohibited warrantless back-door searches. Nunes wrote a letter to his colleagues, imploring them to oppose it. “When the Intelligence Community acquires the communications of [foreign] targets abroad, among the most critical issues is to determine if they are communicating with persons in the United States,” he wrote. The same amendment had passed the House twice before, but after Nunes sent his letter, it narrowly failed.

In short, Nunes has fought hard to enable the very surveillance that so offends him now. But if he is having a conversion moment, he chose a good time for it. Section 702 will come up for reauthorization at the end of this year, and Nunes will have the opportunity to throw his support behind his colleagues’ reform measures. If he chooses to oppose them instead, he’ll have only himself to blame if the FBI takes an interest in his own communications with foreign officials.

This article is part of Future Tense, a collaboration among Arizona State University, New America, and Slate. Future Tense explores the ways emerging technologies affect society, policy, and culture. To read more, follow us on Twitter and sign up for our weekly newsletter.