(CNN) On Wednesday, during CNN's town hall with survivors of last week's mass shooting at a high school in South Florida, National Rifle Association representative Dana Loesch lamented the holes in the FBI's National Instant Background Check System, or NICS.

"This madman passed a background check. How was he able to pass a background check? He was able to pass a background check because we have a system that's flawed," Loesch said on stage. "It is not federal law for states to report convictions to the NICS system. It is not federally mandated. That's the big question, and I wish that this network had also covered this more."

Dana Loesch at the CNN town hall

In fact, it was the NRA that led the effort to block the federal mandate, by financing and arguing the US Supreme Court case that let states off the hook. The 1997 decision in Printz v. United States threw out part of the Brady Handgun Violence Prevention Act, and made it optional for local courts, police departments and states to submit background information on residents.

The Brady Act, passed in 1993, established the federal system that screens firearm purchases at licensed dealers. While the FBI built its high-tech NICS system, local police were tasked with conducting the background checks.

However, the NRA teamed up with local sheriffs in Montana and Arizona to challenge the law, saying local law enforcement shouldn't be forced to work for the feds.

Read More