HB2 is just over a week old. But the 5-3 Supreme Court decision that will strike it down is already clear.

When North Carolina’s legislature came together for a one-day emergency session to pass HB2, a state law that struck down Charlotte’s LGBT anti-discrimination ordinance before it could take effect, a lot of us amateur legal buffs wondered: “Didn’t we do this already?”

For the most part we did, and it was all resolved 20 years ago in the Supreme Court case Romer v Evans. Then it was Colorado instead of North Carolina, and Denver, Boulder, and Aspen were playing the roles of Charlotte, Chapel Hill, and Durham. The cities had instituted anti-discrimination protection for gays and lesbians, so in 1992 Colorado’s voters passed Amendment 2, stating that nowhere in Colorado would “homosexual, lesbian or bisexual orientation, conduct, practices or relationships” entitle anybody to claim discrimination in court.

The Colorado Supreme Court struck the law down, holding that it made gays and lesbians into a class of people with diminished political rights: Other Coloradans could petition their local governments for protection against discrimination, but gays and lesbians could not. The state appealed — the “Romer” on the case name is then-Governor Roy Romer, a Democrat — and in 1996 the Supreme Court supported the conclusion of the state court, but with somewhat different logic:

[Amendment 2’s] sheer breadth is so discontinuous with the reasons offered for it that the amendment seems inexplicable by anything but animus toward the class that it affects; it lacks a rational relationship to legitimate state interests.

Romer is really the first place where the Court said that you can’t pass laws to make gays’ lives harder just because you disapprove of them. It led to the whole series of decisions that culminated in last summer’s Obergefell decision legalizing same-sex marriage nationwide. (It was also the first of many gay-rights decision written by Justice Kennedy, who we’ll get to later.)

So is HB2 obviously unconstitutional, without the need to reinvolve the Supreme Court? Not exactly.

You see, HB2’s authors did something clever: Unlike Amendment 2, the law doesn’t actually mention the people it targets. HB2 is in two parts. The part that got all the publicity was about bathrooms: It doesn’t say anything about transgender people, it just says you can only use the bathroom that corresponds to the gender on your birth certificate.

The other part makes it impossible for a city to pass any kind of LGBT non-discrimination ordinance, but it does so without mentioning LGBT people. Ostensibly, this part of HB2 isn’t about sex or gender at all; it’s about creating a uniform business climate across the state, so that prospective employers have only one set of rules to deal with. North Carolina already had a Wage and Hour Act that uniformized various regulations about wages. HB2 amended it to declare that non-discrimination provisions must be uniform across the state too.

Of course, the only people affected by the change are LGBT folks, because those were the only local non-discrimination ordinances in North Carolina. But the law doesn’t single them out by name. It’s just, like, a coincidence or something.

Again, we’ve been here before (in the 1960s and 1970s) with race and gender discrimination. Slate‘s Mark Joseph Stern explains:

Under Arlington Heights v. Metropolitan, courts must attempt to glean whether a law with a disparate impact on minorities was motivated by discriminatory intent. To do so, courts examine several factors—all of which align chillingly with HB 2. For example, does the challenged law disproportionately affect one minority? (Yes.) Does the “historical background” reveal “a series of official actions taken for invidious purposes”? (Yes—the stated purpose of the law was to overturn Charlotte’s LGBT nondiscrimination ordinance.) Do the events leading up to the law depart from normal decision-making procedures? (Yes; the legislature rammed the law through in record time with minimal discussion.) Does the legislative history reveal governmental animus? (Absolutely: From the start, Republican legislators have vocally supported HB 2 as an effort to disadvantage LGBT people.)

But there’s a still a problem: In all those gay-rights decisions he wrote, Justice Kennedy dodged the question of whether laws concerning gays and lesbians require some form of heightened scrutiny, like laws affecting race and gender do. Laws that affect women or racial minorities may seem to be about something entirely neutral, but because governments have a long history of race and gender bias, courts can’t take that at face value; they have to consider the broader situation in the way Stern describes. Lower courts have sometimes decided that heightened scrutiny was called for — the Colorado Supreme Court did in Romer, for example — but Justice Kennedy has a frustrating way of reaching decisions without resolving the underlying legal issues (something I have complained about repeatedly).

So there is something to decide here: Should North Carolina’s legislature be taken at its apparent word, that this is just about a uniform business climate, unrelated to any animus towards the LGBT community? As Stern points out, that’s a really hard case to make, if the Court lets itself consider the broader context at all. But no particular precedent says it absolutely has to do that.

So this will reach the Supreme Court, and the votes there are already obvious: Roberts, Alito, and Thomas will want to favor HB2, just as they have been on the wrong side of all the gay rights cases. Breyer, Ginsberg, Sotomayor, and Kagan will be want to strike it down, since I believe they all already see sexual orientation as requiring heightened scrutiny. That leaves Kennedy, who will do what he always does: decide the case in favor of gay rights, without laying any principles that will keep the next case from coming back to him.

So that’s a 5-3 vote to strike HB2 down, a margin that will be unaffected by whether Justice Scalia is replaced in time to matter.