Mourners visit a memorial for the 26 victims of the church shooting in Sutherland Springs on November 7, 2017. Photo: Scott Olson/Getty Images

Mass shootings have become so frequent in America that there’s now a familiar, depressing pattern to the political response. Republicans send their “thoughts and prayers” to the victims. Democrats say what we really need is stricter gun-control laws, not well wishes. The right claims the left is secretly looking to do away with the Second Amendment altogether, and someone on Fox News declares that the answer to the problem is more guns.

But something different happened after the shooting at a Texas church on Sunday that left 26 people dead. Rather than dismissing calls for new gun laws, several Republican senators joined their Democratic colleagues in drafting legislation that might have helped prevent the massacre.

Their efforts were promptly mocked on the right — though preventing domestic abusers from getting their hands on firearms is actually one of the rare areas of the gun debate where there’s widespread agreement.

A day after the shooting, the Air Force admitted that it had failed to report to a federal database that gunman Devin Kelley was court-martialed for assaulting his wife and infant stepson in 2014. He served a year in prison, then received a bad-conduct discharge from the military. Statistics from last year suggest that agencies may not be reporting felonies, domestic-violence misdemeanors, and restraining orders to the National Instant Criminal Background Check System (NICS).

John Cornyn, the Senate’s second-highest-ranking Republican, said he planned to introduce legislation to ensure that all federal departments and agencies upload conviction records to the system. Republican senator Jeff Flake also announced that he would work with Democratic senator Martin Heinrich “to prevent anyone convicted of domestic violence — be it in criminal or military court — from buying a gun.”

In response, he was attacked by the president’s son and called out in the right-wing media for wanting to end a loophole that doesn’t exist.

Writing a bill w/ @MartinHeinrich to prevent anyone convicted of domestic violence – be it in criminal or military court – from buying a gun — Jeff Flake (@JeffFlake) November 7, 2017

Incredibly proactive considering that law has been on the books since the mid 90s. https://t.co/li2bSEW0LE — Donald Trump Jr. (@DonaldJTrumpJr) November 7, 2017

If being proactive means closing the #DomesticViolenceLoophole exploited by the #SutherlandSprings Texas shooter, you're right. https://t.co/8S89dgaTuK — Jeff Flake (@JeffFlake) November 7, 2017

It’s true that under existing laws, the Air Force should have entered Kelley’s conviction into the background-check database. Convicted felons were prohibited from buying guns under the Gun Control Act of 1968, and Congress adopted the Lautenberg Amendment in 1996 to ban people convicted of misdemeanor domestic violence from possessing firearms. Those laws apply to service members; the Air Force’s failure to report Kelley was a terrible mistake.

Flake knows those laws exist; his argument is that in effect, discrepancies between the military-justice system and civilian law are hampering reporting. The Uniform Code of Military Justice does not have a specific charge for domestic violence, so they’re lumped together with other assaults. Flake says this contributed to underreporting of domestic-violence offenses in the military, an “egregious oversight.” His bipartisan legislation, the Domestic Violence Loophole Closure Act, aims to clarify the existing law by requiring the Department of Defense to determine if an assault conviction in military court would be considered domestic violence in state court. If so, the military would be required to report it.

Outlets including National Review and Townhall acknowledged that the existing ban on domestic abusers possessing firearms should be enforced. But the focus was on mocking Flake for describing the problem as a loophole, and suggesting that legislation was required to remedy it (they did suggest an alternate method of fixing the issue).

When it comes to addressing gaps in the law that allow domestic abusers to obtain guns, this week’s efforts by Flake and other lawmakers, while commendable, only scratch the surface. (And not just because it seems doubtful that that Republican-led Congress will actually vote on such legislation.)

The most well-known issue is the Lautenberg Amendment’s “boyfriend loophole”: The law only applies to spouses, people who live together, or those who have children together. Forty years ago, the majority of intimate homicides were committed by a spouse, but today, that number is equal for married couples and those who are dating. Thanks to the “stalker loophole,” the law doesn’t even cover those convicted of that crime.

Federal law also only applies to those who have been convicted of misdemeanor domestic violence, and those who are under a final protective order. As the Trace reported last year, only 16 states require someone to give up their firearms when they’re under a temporary restraining order — a particularly dangerous period when an abuser is faced with the prospect of losing their victim.

While federal law bars certain abusers from possessing weapons, not just purchasing them, there’s no enforcement mechanism. According to Everytown for Gun Safety, only 14 states require those convicted of domestic-violence misdemeanors to turn in their weapons. Earlier this year, Boston University researchers concluded that the rate of intimate-partner violence involving firearms was 14 percent lower in states with such laws.

Despite a patchwork of state laws addressing these loopholes, laws intended to disarm abusers clearly aren’t working as well as they should. An average of 760 Americans are shot to death by their current or former partners each year, according to an Associate Press analysis. And as we’ve been reminded many times this week, domestic violence is the thread that connects Devin Kelley to Orlando nightclub gunman Omar Mateen, to numerous other mass killers.

For decades, lawmakers have been able to work together to make progress on the specific issue of keeping firearms out of the hands of abusers. A bipartisan effort to close the stalker and boyfriend gaps failed in the face of NRA opposition two years ago, but was reintroduced over the summer. Congress isn’t going to pass sweeping new gun laws that magically solve America’s mass-shooting epidemic, but tweaking existing legislation on this specific issue is feasible.

If the conversation sparked by the Sutherland Springs church shooting ends at correcting the military’s reporting error — or worse, mocking Jeff Flake for his efforts to fix that problem — we will have squandered a massive opportunity to prevent future tragedies.