To me, this is a somewhat valid defense. Let's say you get caught speeding, and they see you're on your cell-phone while drinking a soda. This fictional state had recently passed a law that increased the serverity of the violation depending on how many simultaneous infractions they could cite you with. Since you had three, that puts you in jail overnight.
How are you supposed to know when new laws come out? Police officers don't even really understand the law that well. I feel like ignorance actually matters here.