On Tuesday, the West Virginia Supreme Court of Appeals ruled that the state’s hate crime law does not cover anti-gay assaults or any crime committed on the basis of sexual orientation. Its 3–2 decision marks a setback for civil rights advocates’ efforts to persuade courts that laws prohibiting violence and discrimination on the basis of sex also protect LGBTQ people. The loss, however, is a narrow one—and the poorly reasoned majority opinion is unlikely to affect the growing consensus in the federal judiciary that anti-LGBTQ discrimination is always “because of sex.”

Tuesday’s decision in West Virginia v. Butler emerged from a disturbing case of anti-gay bias. In 2015, Steward Butler, a college football player, allegedly attacked two men for kissing in public after shouting homophobic slurs. Prosecutors charged Butler not only with battery but also with a hate crime. West Virginia’s hate crime statute does not explicitly include sexual orientation, but it does bar violence “because of sex.” Prosecutors argued that Butler’s alleged attack fell under this prohibition because it was motivated by sex stereotyping, and because sex lay at the root of the brutality: Butler allegedly beat each man for intimately associating with a person of the same sex, and if either were different sex, he would not have assailed them.

Writing for the majority, Chief Justice Allen H. Loughry II rejected this theory, writing that the “common and ordinary meaning” of the word “sex” simply “imparts being male or female, and does not include ‘sexual orientation.’ ” He reached this conclusion by citing several dictionary definitions and ignoring Supreme Court precedent interpreting sex discrimination to encompass “the entire spectrum of disparate treatment of men and women resulting from sex stereotypes.” Loughry also noted that the legislature has repeatedly tried and failed to add “sexual orientation” to its hate crime statute. Its failure to add these words, Loughry asserted, indicates that the legislature did not intend to protect LGBTQ people from hate crimes.

In a forceful dissent, Justice Margaret L. Workman, joined by Justice Robin Jean Davis, criticized Loughry for giving “the shortest shrift to real critical thinking.” The majority decision, Workman wrote, “is overly simplistic and constricted,” because “the absence of … those two magic words”—sexual orientation—“does not definitely resolve the question presented by this case.” In reality, Workman explained, “certain individuals are targeted for violence because they are perceived to violate socially-established protocols for gender and sex roles. The perpetrators in such instances have drawn conclusions that the victim has contravened certain unspoken rules” regarding men and women. When he acts on those conclusions, “the bias-motivated crime” is committed, quite literally, “because of sex.” Workman elaborated:

If a man stands on a corner kissing a man and is beaten because he is kissing a man, has he been assaulted because of his sex? Yes, but not simply because he possesses male anatomical parts; rather, the crime occurred because he was perceived to be acting outside the social expectations of how a man should behave with a man. But for his sex, he would not have been attacked.

In an elegant analogy, Workman compared this sex stereotyping to race stereotyping, which is already acknowledged to be form of race discrimination:

If a Caucasian man is fired because he is married to an African-American woman, has he been discriminated against because of his race? Yes, but not simply because of the hue of his skin; rather, the act was committed because he was perceived to be behaving outside the social expectation of how a Caucasian man should behave with an African American woman. But for his race, he would not have been fired.

Unfortunately, Workman’s view did not find majority support, and the many cases she cited to prove her point are not binding precedent: The West Virginia Supreme Court has final say over the meaning of state statutes, and it isn’t constricted by federal courts’ interpretation of similar laws passed by Congress. Until the state legislature adds “sexual orientation” to the law, LGBTQ West Virginians will lack state-level protections against hate crimes.

On Wednesday, I asked Greg Nevins, a Lambda Legal attorney who filed an amicus brief supporting the prosecution, what he made of the ruling.

“It’s increasingly clear that we lose if judges focus on the words that aren’t in the statute,” Nevins told me, “and win if they focus on the words that are in the statute. The West Virginia Supreme Court narrowly went for the old-school former approach, which was in vogue in the federal appellate courts a dozen years ago. But notably those courts are now realizing the error of their ways and moving towards getting it right.”

The West Virginia Supreme Court, though, did not get it right on Tuesday. And the task now falls to the West Virginia legislature to fix the hole that the court just blew through the state’s hate crime statute.