You can legislate a sane school/legal environment that removes the arbitrary and capricious power from possible bigots, overreactors, and other adult bullies.
Actually, most of the early response from public critics -- and most of the major-actor outreach to counter the official sanction directed at the student -- seemed to focus largely on the lack of sensibility of the administration and it being a failure of authoritarianism stifling harmless youthful experimentation. There was some speculation about the official reaction potentially having racist motivation, but the issue becoming principally about racial and/or religious bigotry really kind of took off as defenders of the actions by the school (or those just wanting to bash Obama because politics) started arguing that the student must have been guilty of doing something wrong, even if it wasn't actually building a bomb, because of his families background.