Shortly after Attorney General Jeff Sessions announced on Tuesday that the Trump administration will end the Deferred Action for Child Arrivals program, the Department of Homeland Security released an FAQ that confirmed immigration advocates’ worst fears. To receive DACA benefits, applicants had to turn over a huge amount of personal information to the government. Now, the FAQ explained, the government will provide this information to immigration enforcement agents if they ask for it. Undocumented immigrants who applied for DACA placed an enormous amount of faith in the government. On Tuesday, the government revealed it will betray their trust.

President Donald Trump has performed this kind of bait-and-switch before. In July, the president announced he would ban transgender individuals from the military just one year after the Pentagon invited trans troops to serve openly. Trans service members who revealed their gender identity may soon be purged based on information they provided. DACA beneficiaries and transgender service members thus find themselves in the same bind: encouraged to provide sensitive information to a government that may now use that information against them. This duplicity is plainly unfair—so radically unfair, in fact, that it may cross a constitutional line.

The Supreme Court has long said that the Constitution’s Due Process Clauses enshrine certain principles of fundamental fairness, including the assumption that individuals can reasonably rely on the government’s promises. In 1959’s Raley v. Ohio, the court deployed this doctrine to reverse the conviction of several people who testified before Ohio’s Un-American Activities Commission. While the commission allowed these witnesses to assert their privilege against self-incrimination, the state later prosecuted them for refusing to answer questions. To sustain these convictions, the court explained, “would be to sanction the most indefensible sort of entrapment by the State—convicting a citizen for exercising a privilege which the State clearly had told him was available to him.” Due process protected the witnesses from punishment.

In 1965’s Cox v. Louisiana, the court drew upon Raley’s reasoning in overturning the conviction of a civil rights protester. Police officials had informed the man, the Rev. Ben Elton Cox Sr., that the law permitted him to protest across the street from a courthouse. But when he held a demonstration in that precise spot, he was arrested, charged, and convicted of obstructing public passages and breach of the pass. The Supreme Court reversed the conviction, holding that it constituted entrapment in violation of due process.

These cases revolved around criminal prosecutions, whereas the trans ban and DACA involve civil disputes. But as law professor Zachary Price has argued, the same basic principles should apply when the government coaxes individuals into offering up sensitive, potentially damaging information. The Trump administration, Price wrote, “cannot use information from these immigrants’ own [DACA] applications against them.” The government’s “request for information based on promise relief” undoubtedly “invites reliance” in a constitutionally significant manner reminiscent of Raley and Cox. Price continued:

Had DACA never existed, the government would have had to do gumshoe detective work to identify and apprehend DACA beneficiaries. It shouldn’t be spared that burden by virtue of having tricked those same immigrants with false promises of relief. To allow the government to perform such a bait and switch would be an outrageous form of entrapment that the Due Process Clause should prevent.

DACA recipients turned over their personal information based on the government’s promise not to use it against them. And while deportation is not technically a criminal matter, the Supreme Court has recognized that its can be more severe than criminal penalties. Under Raley and Cox, then, DHS should be barred from sharing any DACA information for the purposes of initiating or assisting in deportation attempts.

Opponents of Trump’s trans ban have made a similar argument. In their motion to block the policy, the National Center for Lesbian Rights and GLBTQ Legal Advocates & Defenders assert that any adverse action against trans troops would infringe upon their due process reliance interests. “Many transgender service members publicly identified themselves as transgender, undertook medical treatment, and changed their gender markers” in response to the Pentagon’s trans-inclusive policy, the motion explains. They “came out as transgender to their chain of command in reliance on official policy. The profound unfairness of now penalizing them for doing so” runs afoul of the “due process guarantee against unjustly penalizing those who reasonably rely on the government’s representations.”

When the Supreme Court addresses reliance interests, it often speaks broadly with few helpful guidelines. But at a minimum, the court has clarified that laws which “unsettle expectations and impose burdens on past conduct” may run afoul of due process. Trump’s trans ban would seem to fall into this category. In addition to being arbitrary and malicious, the policy would punish service members who came out because the Pentagon encouraged them to do so. This betrayal of trust only exacerbates the ban’s troubling constitutional infirmities.

As a general matter, new presidents get to reverse the policies of their predecessors. Trump can, for instance, lawfully repeal an executive order barring LGBTQ discrimination by federal contractors, and he has already revoked a rule that protected equal pay for women. But when these reversals hurt individuals who relied on the old rules, the Constitution may limit the president’s leeway. Trump can kill DACA, but his administration should be barred from using DACA data to punish its former beneficiaries. And though Trump is commander in chief, he should not be able to purge troops who revealed their gender identity at the invitation of his precursor. Presidents come and go, but due process will always place limitations on executive caprice.