Yeah if a judge and jury decide on a single case to not uphold the law as written, fine. But no future judge should be able to use that as "precedent." They can only judge based on laws voted into law by elected legislators. The legislators are free to use court cases to argue for changes to the legal code.
That (AFAIK) is the difference between civil and common law. Civil law you can be incriminated based on laws defined by the legislature. Common law, you can be incriminated based on those laws, and also "precedent." And precedent (for all intents and purposes) takes precedence over legislation.