The average professional in this country wakes up in the morning, goes to work, comes home, eats dinner, and then goes to sleep, unaware that he or she has likely committed several federal crimes that day. Why?
The US Supreme Court has repeatedly held the opposite - that police officers are immune to prosecution for their ignorance of the bounds of their powers unless explicitly informed.
IANAL; I believe you are referring to the second prong of the qualified immunity (QI): "right infringed has to be "clearly established" at the time of the official's conduct."
We should maintain QI but this second test needs an update.
Also not true. They have a duty to enforce the law as they understand it (noting that verification is just a phone call away), which may be better than average due to training and experience, or not.
Either way, your duty is to cooperate with law enforcement. If they are wrong, the only proper place to determine that is the courts. If they are right, you'll still have avoided a "resisting" charge