Consider this: there are over 4,000 federal statutes alone that bolster the Federal Government. I know cases beforehand have argued ignorance doesn't equal innocence HOWEVER if the tax payer funded school systems failed to educate students on federal and local laws, then they FAILED to inform citizens of the laws that require consent of the governed to be enforceable. Otherwise, public education and REQUIRING it is essentially unconstitutional...
Why have a public education system if it's not going to inform. Not informing people they are then being indirectly coerced into breaking the law which is entrapment... Ignorance IS innocence because citizens were not informed of the laws they were supposedly breaking and thus could not consent either way.
There are over 60 million laws, statutes, ordinances, etc. in the U.S. Everyone is ignorant of the law. The entire notion of innate knowledge is absurd -- lawyers and judges always research the law of a case. Maxims of bureaucratic convenience and a lust for uniformity do not make it so.
The fictions that: "every man is presumed to know the law" and its sequel "ignorance of the law does not excuse" are a result of civil-law maxims infecting Romans 2:14-15, i.e., natural law means all know right from wrong.
Traditional common law has recognized that in fact, not all do know the law. Natural law is not known by nature, and common law distinguishes between: an ability to learn & respond to the law (i.e., responsibility), and an innate knowledge of the law.
Scott v. Ford, 45 Or. 531, 78 P. 742, 80 P. 899, 68 L. R. A. 469 (1904) found that money paid "even if accompanied by a mistake as to the law or ignorance of it, a recovery may be had."
So, as OP noted, ignorance of the law can be a valid defense.