So far, what has prevented friendly fire errors is: 1) the deterrent effect of known armed security at a site - no active shooter, no guns out, 2) the scarcity of armed security at most sites - no friendlies to be mistakenly shot.
When Israel armed up, terrorists switched to bombs. But they were not lone wolf attackers, they had supporting terrorist organizations behind them. Those with bomb-making capabilities will be far fewer than crazies with guns here in the US. Bomb threats are always going to be more common than bombings, unless things spiral much farther down the shitter.
Eventually, as more schools arm up, there will be some friendly fire errors. But most crazies will seek other venues (malls, outdoor events, etc) with less/no security. Crazies are, more often than not, not stupid.