Yeah, I'm not a lawyer but the system seems honestly nonsensical. They found the law inconvenient, so the court just effectively added a "clear and present danger" clause to the law. If there were problems with people abusing their freedom of speech, then you'd think the natural response would be to amended the bill of rights - and not just a bunch of unelected judges dreaming up something that seems "reasonable"
I honestly can't speak to "reasonable", but this format of jurisprudence has been common for the better part of 4000 years (see Jewish law and case law that pops up in the Bible's old testament, especially the tanach).