Legal in principle, yes. And yet, this person got arrested and harassed, and had to go to court to prove his point, where he was at non-zero risk of being convicted and sent to prison depending upon a reading of the law. Needless to say, his day, and his trip, were ruined.