George Alvarez spent four years in a Texas prison because a jail guard lied. The guard told prosecutors that the 17-year-old teenager had grabbed him by the throat while being transferred to another cell in a Brownsville detention center in 2005. Alvarez, a special-education student in the ninth grade at the time, pleaded guilty to assaulting a peace officer in exchange for a suspended eight-year prison sentence—so long as he completed a substance-treatment program. He did not, and began serving the eight-year term.

Halfway through his sentence, video footage came to light that prosecutors had never gathered from police officers, and thus never shown to the grand jury. The footage showed no such attack. Instead, the guard could be seen placing Alvarez in a choke hold and eventually a head lock while the young man flailed beneath him. His hands and arms were pinned down, nowhere near the guard’s throat. The Texas Court of Criminal Appeals found Alvarez to be “actually innocent” of the charges and vacated his conviction in 2010.

Alvarez then did what any citizen whose rights are violated can do: He sued the city of Brownsville, citing Supreme Court rulings that require the government to turn over exculpatory evidence in their possession to the defendant. This week, however, the Fifth Circuit Court of Appeals threw out his lawsuit, siding with the city’s defense that it wasn’t legally liable for the guard’s actions. But the judges also rejected Alvarez’s constitutional argument. Yes, the court said, prosecutors have to turn over evidence that may prove a defendant’s innocence for a criminal trial. But that constitutional right doesn’t apply when the defendant agrees to a plea bargain, they concluded.

How can that be? After all, plea bargaining is not some ancillary feature to the criminal-justice system. In many ways, it is the modern criminal-justice system. More than 95 percent of criminal cases are resolved through plea agreements in the state and federal systems. Jury trials, for all their ubiquity in American films and television shows, are now the exception instead of the rule. The result is a bureaucratized method of dispensing punishment, one that sometimes evades key protections for Americans’ constitutional rights.

Prosecutors are obligated under what’s known as the Brady rule to disclose any evidence in the government’s possession that may benefit a defendant’s case. The rule takes its name from the landmark 1963 case Brady v. Maryland, where the Supreme Court held that withholding exculpatory evidence violated a defendant’s right to due process under the Fourteenth Amendment. But the lower courts are divided on whether that also applies to the plea-bargaining process. The Supreme Court itself has never ruled on the matter.