Parkland high school student Isabelle Robinson deserves high praise for her New York Times essay debunking the vile suggestion that it was persistent bullying that made school shooter Nikolas Cruz snap and go on a killing spree. As with most conspiracy theories that hatch after tragedy, this one distorts reality and is disrespectful to both the victims and survivors of the Parkland school shooting.

Yet Robinson’s story provides a window into another very important but overlooked factor that contributed to the tragic events in Florida: lax discipline policies that permit dangerous students continuous contact with others and allow their pathologies to fester.

As Robinson tells it, she first became aware of Cruz’s violent and sociopathic tendencies years ago when, in the school cafeteria, he threw an apple at her 12-year-old, 90-pound frame causing her to gasp for air. Years later, Robinson was assigned to tutor Cruz through the school’s peer counseling program where she endured verbal abuse and sexual harassment by him. In a heartbreaking look back, Robinson writes that she’s now horrified that school officials left her alone with Cruz, who she says, “…had a known history of rage and brutality.”

In addition to feelings of horror, Robinson and her parents should be furious that she was ever put in this dangerous situation by school administration in the first place.

In fact, after the shooting, one of Cruz’s teachers described her discomfort with Cruz, saying: “I did not want to be alone with him in my classroom.” And yet, due to policies in place, these adults left Cruz alone with his female classmate.

Sadly, Robinson’s situation isn’t unique to Parkland’s Marjory Stoneman Douglas High School. In January 2014, Former President Barack Obama’s Education Secretary Arne Duncan issued “Guiding Principles: A Resource Guide for Improving School Climate and Discipline,” in which he pushed for radical changes to the way schools approached troubled kids in order to curb what the Obama administration called the "school-to-prison pipeline." The main goal of the guidance was to reduce the number of suspensions and expulsions, particularly among students of color and students with disabilities—the two demographics that have the highest rates of disciplinary actions.

Certainly, this guidance was well-meaning, a sort of trickle-down social justice theory that if these troubled kids are better understood and if there is a reduction in the number of suspensions and expulsions, then they will be less likely to drop out of school, turn to drugs or crime, and end up in prison.

To comply with the guidance, schools were instructed to rely less on local police to intervene with trouble-making students and more on “school resource officers” who would focus on “protecting the physical safety of the school … while reducing inappropriate student referrals to law enforcement.” Schools also began replacing more traditional methods of discipline with student-led mentoring programs (like the one in which Robinson was involved) as well as “restorative justice” programs, a Breakfast Club-like fantasy where, instead of punishment, the bully or the violent offender engages in talk therapy and group discussions with the kid he or she has been harassing to seek reconciliation.

That sounds like great fun for the victim.

In Broward County, schools were eager to comply with the new federal guidelines. In fact, Broward County Superintendent Robert Runcie (who had previously worked with Education Secretary Duncan in the Chicago Public Schools) got a head start, creating the Promise Program (Preventing Recidivism through Opportunities, Mentoring, Interventions, Supports & Education) in 2013. The Promise Program shared the Obama administration’s goals, relying less on local law enforcement in favor of SROs and restorative justice-style programs.

According to analysis by the Washington Post (and Runcie’s own online bio), these programs worked to reduce arrests in schools, which in Broward county went from 1,056 in 2012 to 392 in 2016. Yet, while arrests declined, the program came at a cost–the most obvious being that it allowed students with severe discipline problems to remain in the mainstream at their schools, a potential safety threat to other students.

Nikolas Cruz was even allowed to commit crimes (including assaults, threats, bringing weapons to school) without being arrested. Had he been arrested, he might have undergone a mental health evaluation or been sentenced to a juvenile detention center and kept far away from his fellow students. Yet, when asked by reporters about this lapse of judgment, Broward County Superintendent Runcie simply said: “We can’t solve every problem.’’

He’s right. Schools can’t solve every problem, but they shouldn't create problems for students like Robinson by putting children on the front line in positions where they are expected to cure the ills of their troubled classmates.

Perhaps school officials nationwide should start thinking about how school discipline fits into the larger picture of school safety.