The law was probably fine - that case was just wrongly decided based on the outcome the majority of justices wanted.