This is the kind of thing that destroys one’s confidence in the law. It is a law that criminalizes a non-crime.
The government loves to do this. You say “he” to a man. Your cat goes out for a walk on your grass. You’re arrested and you have a criminal record.
Straw laws shall be enforced but we cant defend our borders and must not detain illegals.