In choosing Mike Pence as his running mate, Donald Trump has shored up the GOP’s religious base. But based on the Indiana governor’s disastrous run-in with pro-business Republicans and moderates last year over gay rights, Trump may have just lost the election.

On the face of it, the Pence pick makes all the sense in the world. While most evangelical leaders have cozied up to the twice-divorced, philandering, casino-owning, Bible-mispronouncing, clearly irreligious Trump, many key conservative Christian voices have actually inveighed against him.

For example, Russell Moore, president of the Southern Baptist Convention’s Ethics and Religious Liberty Commission—no liberal or moderate—penned a fiery New York Times op-ed condemning Trump. (Trump, of course, fired back on Twitter, calling Moore “a terrible representative of Evangelicals.”) And a survey conducted in May found that Trump is viewed unfavorably by 67 percent of registered evangelical voters. (Hillary Clinton is viewed unfavorably by 81 percent.)

Given that evangelicals comprise 48 percent of Republican primary voters, those are worrying numbers. There are, after all, three major parts of the Republican voter base: fiscal conservatives who are socially moderate or agnostic (e.g., Romney, Jeb Bush, and other so-called RINOS), right-wing populists/Tea Partiers/racists, and the religious right.

Unlike Newt Gingrich and Chris Christie, Pence has been a right-wing culture warrior for his entire career. As Samantha Allen detailed at The Daily Beast recently, Pence has been so outspoken in his anti-abortion politics that he even spawned a hashtagged backlash among women, #periodsforpence. Pence has walked the talk for years, pushing through one of the nation’s most restrictive anti-abortion laws and voting to defund Planned Parenthood years before it was cool to do so.

Such actions have endeared Pence to the Christian right, shoring up two out of the three GOP bases for Trump. And by and large, the third part has remained silent when it’s come to reproductive rights. While chambers of commerce may lack the anti-abortion zeal of the Family Research Council, they’ve been more than happy to be in coalitions with them. Banning abortion isn’t bad for business, after all.

But the LGBT issue has been a different story.

When Pence turned against the LGBT community last year, pushing through a “Religious Freedom Restoration Act,” or RFRA, that allowed businesses to turn away gay customers, enabled corporations to deny insurance coverage to LGBT people (and women), and, more broadly, was accurately interpreted as a gift to the anti-gay fringe of the Christian right (such as the lobbyists who stood behind Pence when he signed the law), the business community rebelled.

The reason wasn’t altruism, but capitalism. In the furor over Indiana’s RFRA, the state lost 12 large conventions, an estimated $60 million in business, and an untold number of businesses choosing to locate elsewhere, with the Hoosier State rebranded as the Hater State.

One study estimated that the total economic cost of Pence’s RFRA has been $250 million.

Indeed, as radically as American public opinion has shifted on same-sex marriage, corporate America’s shift on LGBT equality more broadly has arguably been even more remarkable: 89 percent of Fortune 500 companies prohibit discrimination on the basis of sexual orientation—something explicitly permitted in Indiana. (Other states, like North Carolina, have even forbidden localities from passing anti-discrimination laws.)

And when Arizona’s state legislature passed a bill like Indiana’s, that state’s conservative governor, Jan Brewer, vetoed it under pressure from the likes of the National Football League (which threatened to pull the Super Bowl from the state).

Now, the NFL is hardly the Human Rights Campaign. Like most chambers of commerce, it tilts Republican—even pro-Trump, if former coach Mike Ditka is any indication. But pro-business Republicans have read the data: for example, that workplace discrimination costs the American economy $64 billion a year, and that 42 percent of gay people (and 90 percent of transgender people) say that they’ve experienced it.

It’s also just common sense: If you’re trying to attract the most qualified employees, telling 5 to 10 percent of them that they might be discriminated against isn’t a great recruitment strategy.

And yet, when the same business interests who persuaded Jan Brewer to veto Arizona’s RFRA pressured Pence to undo Indiana’s, he doubled down, proposing only a one-sentence amendment that didn’t protect LGBT people at all.

This in the face of pressure from the likes of the NCAA, which made the same warning about the Final Four that the NFL had made about the Super Bowl. Pence called their bluff—and, under the cover of that one-sentence amendment, the NCAA blinked.

But the rest of the pro-business Republican base hasn’t. Chambers of commerce have opposed RFRAs, successfully and not, in Texas, Georgia, North Carolina, and around the country. The language of “religious freedom” plays well to the Christian right base, which sincerely believes itself to be under attack by secular America. But it is now widely understood to be a code-word for permitting discrimination against gays, women, and others.

As we saw most dramatically in Texas, this has pitted two of those three Republican bases—pro-business moderates and culture-war conservatives—against one other. Texas, in particular, is no longer the cowboy-state cliché of Rick Perry and Ted Cruz. Its business community, in particular, wants to shed that image. And so when social conservatives proposed over 20 anti-LGBT laws in the last legislative session, pro-business Republicans squared off against them.

In other words, Trump’s pick may well backfire. If Mike Pence were merely a foe of abortion, that would be one thing. But Trump has chosen the poster child for “religious freedom” and anti-gay discrimination—precisely where pro-business Republicans have drawn the line.

Add the Pence choice to the “most anti-LGBT platform in the party’s history” (in the words of the hapless, hopeless Log Cabin Republicans group), Trump’s many derogatory comments about women, and Trump’s extreme anti-business positions on protectionism, and it’s easy to see a Trump-Pence ticket as attracting few pro-business Republicans at all.

It doesn’t matter what gay people think of Pence—they’re not going to vote for Trump anyway. But it does matter what moderate Republicans and Democrats think. And based on the last year of evidence, they don’t think highly of using religion as a pretext for discrimination. On this issue, Pence is a loser.