The Illinois Supreme Court ruled last week that a lobbyist for a teachers’ union was entitled to a public pension, potentially worth more than $1 million over his lifetime, after working just one day as a substitute for a middle school history class. How was that possible? Could anyone go work as a substitute teacher for a day in Illinois and get a pension?

No. David Piccioli, a lobbyist for the Illinois Federation of Teachers, took advantage of a very specific set of circumstances, which is partly why the Legislature tried—and failed—to negate his pension.

The scheme started in October 2006, when a state House staff member asked Steven Preckwinkle, a director at the IFT, whether the union would be interested in supporting a bill about retirement funds. A stipulation tucked into the legislation allowed people to count their years as union employees toward a teacher’s pension. As long as those private union employees had a teaching certificate, worked in a classroom, and paid contributions before the bill was signed into law, they would be entitled to the public pension.

The IFT ultimately decided to back the bill, and Preckwinkle notified approximately 40 employees, including Piccioli, in November of that year that they had only a few months to become eligible before the bill signing. Piccioli, who appears to have been the only person to fully pursue the opportunity, then worked for one day in December as a substitute and obtained his teaching certificate. He also paid $192,668 to cover the contributions. Two months later, Gov. Rod Blagojevich, who had received a reelection endorsement and more than $515,000 from IFT, signed the bill.

In 2011, shortly after Blagojevich had been removed from office for trying to sell President Barack Obama’s vacant Senate seat, the Chicago Tribune and WGN-TV uncovered the pension arrangement. Some lawmakers were disturbed by the news and moved to strike out the union-employee stipulation from the pension bill. The state Legislature enacted a law that effectively reduced Piccioli’s pension. He sued, and the state Supreme Court ultimately ruled that the law violated the state constitution, which dictates that established pensions cannot be “diminished or impaired.” (Piccioli was further allowed to keep his prior 401(k) plan with the IFT and a separate pension for his time as a House aide.)

Not all the judges on the court agreed with that decision. Three of them joined in a dissent arguing that the pension bill violated the Illinois Constitution’s prohibition against special legislation, which are laws that explicitly apply only to a particular set of constituents. For example, a state law benefiting only people in Chicago would be a clear case of special legislation. The dissenting judges contended that the bill essentially gave pensions to a specific subset of union employees who were able to gain teaching credentials and experience in the narrow, arbitrary window of time between the bill’s passage in the Legislature and signing by the governor. They further pointed out that Preckwinkle even told IFT employees that he would try to delay the bill signing to give them all time to work as a substitute teacher. “Slamming a window shut before it ever opened smacks of special legislation,” the dissent reads.

However, special legislation prohibitions have weakened considerably since their heyday in the 19th century, and it’s rare now to see judges base decisions on them. In this case, the court’s majority decided that while the bill did benefit a particular set of people, setting a deadline for the eligibility window wasn’t arbitrary. The justices also cited the clause in the state constitution stating that pension benefits “shall not be diminished or impaired.” Though many state constitutions have similar clauses, the Illinois Court has been particularly stringent in its interpretation of the protections. In 2016, the Legislature attempted to change the way pensions were calculated. The court struck down the law and essentially ruled that there would need to be a constitutional amendment to make any adjustments.

Since Piccioli was the only union official to take advantage of the pension bill, the decision is unlikely to have a broad impact. Yet the unusual facts of the case have further inflamed debates over the state’s pension system, which is more than $130 billion in debt. Some, like the editorial board of the Chicago Tribune, argue that the state Supreme Court’s strict reading of the state constitution’s pension clause has repeatedly allowed people to exploit loopholes. The Legislature could change the clause to relieve the strain on the system, but any amendment to the state constitution requires three-fifths of the members in the House and Senate to vote in favor, as well as a public referendum.

Explainer thanks Daniel Rodriguez, the Harold Washington professor at Northwestern Law School, and Nadav Shoked, professor of law at Northwestern Law School.