This happens with alarming regularity. I once read through the entire criminal code of Illinois and found about a dozen plain bugs like this just speed-reading it.
The supreme court routinely "fixes" laws by providing a canonical interpretation of them, or else nullifying them altogether by declaring them unconstitutional. That is their business.