Oh, and who should adjudicate if you're legally allowed to do something, if not a judge?
I am quite certain that a judge can utilize statements from a psychologist(or other experts at his discretion) to arrive at his verdict. Are judges perfect? Of course not. But merely arguing that a judge can make a bad call applies to...basically everything that's already illegal. Or legal for that matter. Adding more laws will do exactly nothing to fix that issue, and in fact, I'm not sure what can. Judges are people, and thus, flawed.
I guess I wasn't clear since you chose not to read my article. This is the typical scenario: Crazy guy requests that he can get his guns back at the courthouse. Judge sees the man, and asks "How are you doing?" "Good?, ok you can have your guns back."
http://www.nytimes.com/2011/07/03/us/03 ... wanted=all
Due to variation in state laws, vague guidelines, and lack of information sharing, judges are in a poor position to evaluate people based on their mental health. Take your assumption that judges utilize experts at their discretion. See the problem? at their discretion. After inspecting court records, and investigating the outcomes, judges are giving mentally ill people the benefit of the doubt, and are judging cases with a pretty casual work ethic. In addition, your straw man of expecting perfection from judges is bad. Nobody is expecting 100% correct decisions. However, looking at their current success rate and demanding better is perfectly valid.
You assumed that judges are utilizing experts and some mistakes are slipping through the cracks. The reality is that most judges are not utilizing anybody, and everyone is slipping through the cracks.