One of the most heartbreaking and perhaps infuriating aspects of the Florida school shooting that took 17 lives is just how many red flags there were surrounding the shooter.

The national debate following the shooting has mostly revolved around guns. Much ink has also (rightly) been spilled about the failed leadership of the Broward County Sheriff’s Office in its moment of crisis.

>>> Sheriff Scott Israel Is a Lesson in Failed Leadership

What’s been lost in this discussion are the issues of school safety and discipline. Those issues are highly relevant to what took place in Parkland.

Prior to the mass shooting, Nikolas Cruz was involved in a huge number of incidents on and off campus, numerous calls were made to the police, and the was FBI even involved. He certainly appeared to be a ticking time bomb.

It would seem that somewhere along the way, he should have been stopped before the shooting took place.

But that wasn’t the case.

Max Eden, a senior fellow at the Manhattan Institute, explained in City Journal how an Obama-era Department of Education initiative designed to put an end to the “school to prison pipeline,” combined with local mismanagement, helped allow the shooter to fall through the cracks.

“[I]n 2013, the school board and the sheriff’s office agreed on a new policy to discontinue police referrals for a dozen infractions ranging from drug use to assault,” Eden wrote.

A separate report by RealClearInvestigations found that Broward County was part of a “vanguard of a strategy, adopted by more than 50 other major school districts nationwide, allowing thousands of troubled, often violent, students to commit crimes without legal consequence.”

This was part of a larger Obama administration effort, launched in 2011, to reduce racial disparities in school discipline numbers, according to RealClearInvestigations.

“Students charged with various misdemeanors, including assault, would now be disciplined through participation in ‘healing circles,’ obstacle courses, and other ‘self-esteem building’ exercises,” the report said.

“We must ensure that school discipline is being handled by trained educators, not by law enforcement officers,” said former Secretary of Education John King in 2016. “Some schools are simply turning misbehaving students over to [school resource officers]. This can set students on a path to dropping out or even to prison.”

Florida’s Broward County, which is where the Marjory Stoneman Douglas High School shooting took place, was a leader in adopting this new program and was even touted for it by former Education Secretary Arne Duncan.

The number of school arrests dropped dramatically in the years that followed, but that didn’t mean serious crimes weren’t taking place.

The Parkland shooter was involved in a number of alarming incidents, including assault and bringing bullets to campus, for which he was eventually moved to another school.

Yet the police never arrested the shooter or expelled him, which is in part why he passed a federal background check and was able to purchase a firearm.

The red flags swirling around the shooter went unheeded, and it appears that Broward County’s lax policies deserve some of the blame.

Nevertheless, it’s worth noting there have been many problems with “zero tolerance” policies as well, which became common in the 1990s.

These policies, which Congress designed in part to make school campuses gun-free zones, have at times criminalized behavior that was innocuous and that certainly didn’t require police involvement—hence, the stories about students being suspended for chewing a Pop-Tart into the shape of a gun or being arrested for wearing an National Rifle Association shirt.

In dealing with campus policing practices, it’s important not to overreact to problems and thereby create new problems. Zero tolerance policies come with their own complications.

There is no single policy or idea that can solve the school discipline and school shooter problem overnight, but it’s not unreasonable to expect a department to change its practices after such a catastrophic failure as we saw in Parkland last month.

Whether Broward County and the federal government will honestly evaluate their own failures and change policies remains to be seen.