Some United States judges would like to protect transgender kids from discrimination at school. Some would like to prevent women from being fired because they marry a woman, or men from being mocked at work because they express an interest in other men.

But even if they wish for this to happen, the law may not make it so. Federal law does not explicitly prohibit discrimination on the basis of sexual orientation or gender identity, whether it’s at a store, in a public park, at work, or in trying to rent a house from a landlord. Many states and cities do not explicitly prohibit this, either. While courts have tried to express sympathy for the people who bring these kinds of discrimination cases, a handful of recent decisions suggest judges won’t be willing, or don’t feel able, to affirm LGBT discrimination claims in court until the Supreme Court—or Congress—tell them to do so.

The big question courts have been struggling with is the meaning of “sex.” Under Title VII of the Civil Rights Act of 1964, most employers are prohibited from discriminating on the basis of sex, which covers everything from hiring and promotions to bad job assignments and harassment. Separately, under Title IX of the Education Amendments of 1972, schools that take federal money are prohibited from discriminating against students, denying them services, or barring them from participation in activities on the basis of sex.

What’s unclear is whether that prohibition extends to sexual orientation and gender identity—whether existing federal laws make it illegal for schools to keep transgender kids from using the bathroom that matches their gender identity, for example, or for large businesses to fire people for being gay. These questions have confounded courts since at least 1989, when the Supreme Court ruled in Price Waterhouse v. Hopkins that disparate treatment based on femininity or masculinity—penalizing a woman who refuses to wear skirts or make-up, for example—is illegal. Outside the realm of legal theory, though, it’s difficult to separate a person’s gender performance (how they act out their gender) from their gender identity (whether they identify as male or female) or sexual orientation (who they’re attracted to). In other words: It’s nearly impossible to tease apart the harassment an effeminate gay man might face for his mannerisms, from the harassment he might face over the fact that he has sex with another man when he goes home.

Judges are well aware of this conceptual tangle. Last week, the Seventh Circuit Court of Appeals issued its decision in Hively v. Ivy Tech Community College, a case brought by Kimberly Hively, who claimed she was denied full-time work and promotions because she is a lesbian. She lost, and the reason was straightforward, according to the court: Title VII does not cover discrimination on the basis of sexual orientation. No matter how clear the facts of the case, no matter how explicit the reason for Hively’s stalled out career—it can’t be the basis for a successful suit. Federal law, under which she was suing, does not prohibit employers from refusing to promote lesbians. Because Hively lives in Indiana, she couldn’t sue Ivy Tech under state law, either—the state has no statute that prohibits what she says happened to her.

The Seventh Circuit could have stopped at that, but the judge who authored the decision, Ilana Rovner, went on to include 42 pages of legal research outlining the mess of conflicting decisions that courts have made on this topic. Gender theorists have spent decades trying to disaggregate “sex” from “gender” from “orientation,” but progressive legal groups have done exactly the opposite: They’ve tried to get courts to see all of those concepts as “sex,” with mixed results.

Objections to discrimination based on gender identity have had a bit more success in court than those based on sexual orientation, like Hively’s. When someone goes though a sex-change operation and their colleagues’ behavior toward them changes, for example, “you’re treating someone differently because of their sex than you did when they were the opposite sex,” said Michael C. Harper, a law professor at Boston University. “You’re discriminating against them because they’ve chosen the wrong sex.”

LGBT people “who otherwise conform to gender-stereotyped norms … mostly lose their claims.”

It’s more difficult to make that argument about sexual orientation, in his view. “You’re treating them differently because of their sexual activity, or the sexual activity in which they want to engage—that’s closer to activities or desires, rather than sexual status.”

As the Seventh Circuit described last week, this has led to a confusing set of opinions. Some courts have refused to allow “any claims where sexual orientation and gender non‐conformity are intertwined”; others have not entertained “claims from lesbian, gay, or bisexual employees at all.” Alternatively, a number have tried to “tease apart the two claims … focusing only on the gender stereotype allegations.” At a minimum, this kind of parsing is difficult, and it can border on illogical: One district court in California rejected the distinction between discrimination based on sex and sexual orientation altogether, saying “the line is … ‘difficult to draw’ because that line does not exist, save as a lingering and faulty judicial construct.”

In practice, this has meant that Title VII protects gay men who act effeminate and lesbian women who act butch. But “lesbian, gay, or bisexual people who otherwise conform to gender stereotyped norms in dress and mannerisms mostly lose their claims for sex discrimination,” the court said. “Why this should be true is not entirely clear.”

As this decision suggests, “Judges feel bad, I’m sure, and they want to do what’s right,” said Harper. “But they are constrained by their institutional role.”

Part of the issue, he said, is that these cases are all based on statutes, rather than the U.S. Constitution. In those kinds of cases, judges have an obligation to look at congressional intent—what legislators were trying to do when they passed a certain law. Looking back at the way Congress defined “sex” in 1964, when sex discrimination was added to the Civil Rights Act shortly before its passage, and in 1972, when it was included in new education-related legislation, “it boggles the mind that … they were using it in any sense other than ‘gender,’” Harper said. “There’s no way that Congress intended to cover gender identity or sexual-orientation discrimination when they passed those statutes.”

That’s a matter of disagreement among legal scholars—and judicial and administrative bodies. Last summer, the Equal Employment Opportunity Commission ruled for the first time that sexual-orientation-based discrimination is prohibited under Title VII. In the decision, the agency argued that Congress might not have envisioned discrimination cases against LGBT people when it passed Title VII, for example, but statutes can be used to address “comparable evils.” Excluding LGBT people from discrimination protection under Title VII introduces “a limitation into the text that Congress has not included.”

The EEOC only resolves employment disputes among federal employees, though, and courts are not bound to follow its rulings in the private sphere. Circuit Courts, including the Seventh, take the EEOC’s legal interpretations seriously, but ultimately, they are bound by their own precedents—the way they’ve decided cases in the past is a big factor in determining how they’ll decide cases in the future. Because the Seventh Circuit has previously said in two decisions that Title VII does not prohibit sexual-orientation-based discrimination, its judges feel bound to keep interpreting the statute that way.

If all those courts are wrong, “perhaps it is time for the Supreme Court to step in and tell us so.”

That doesn’t mean they’re happy about it. The irony in the inverted standard of protection is evident: As the Seventh Circuit put it, “We are left with a body of law that values the wearing of pants and earrings over marriage.” Ultimately, the court concluded that irony—or paradox, as they called it—is not theirs to fix. It’s a problem with the way current law is written. No Circuit Court has yet interpreted it any other way, the Seventh Circuit pointed out; if all those courts are wrong, “perhaps it is time for the Supreme Court to step in and tell us so.”

That moment may be close, especially on Title IX, but it may come haltingly. On Wednesday, the Supreme Court stayed a recent Fourth Circuit Court decision on a Virginia case about a transgender student, Gavin Grimm. The circuit court found in favor of Grimm, ordering the district court to rethink Grimm’s request to use the boys’ bathroom, which he feels matches his gender identity. But the Supreme Court put a halt on any kind of enforcement until the school board decides whether to appeal and the high court decides whether to hear the case.

All of the men of the Supreme Court voted to stay the decision: The three typically conservative justices, Samuel Alito, John Roberts, and Clarence Thomas, along with perennial swing voter Anthony Kennedy; and Stephen Breyer, typically a member of the Court’s liberal wing, who joined “as a courtesy.” If the Court heard the case, perhaps Breyer would ultimately join a 5 to 3 decision against the transgender student; perhaps the eight-member Court would split; or perhaps, by the time the case comes back around, a new Supreme Court justice would help steer a yet-unforeseeable outcome.

And there’s yet another major legal challenge on sex discrimination coming up: This spring, the Department of Justice instructed schools to accommodate transgender students or lose their federal funding, claiming its authority under Title IX. Eleven states have sued the agency, claiming it has incorrectly interpreted the meaning of “sex” to include gender identity. The dueling suits will work their way through the court system, and the outcome could potentially affect other parts of the executive branch that have approached the definition of “sex” the same way.

For now, the American legal system is stuck. The executive branch has interpreted “sex” to include “gender identity,” and has tentatively done the same for sexual orientation. But those actions have set off a huge backlash from conservatives and others who believe the government has not gone through the proper rulemaking process on this issue. Members of the judicial branch, for their part, have punted, feeling unable to deliver the decisions they see as just and logical because they are bound by their reading of the law.

Ultimately, this is a question for the third branch of government: Only legislators can truly define the law. Yet, so far, Congress has refused to pass or clarify these kinds of protections, and roughly half of states have done the same. Until they do, let the jostling and confusion continue.