excuse me, but ... uh ... so what? slow down and you wont get locked up.
The police were just doing their job. That said, the issue is not with the police, but the government entity that failed to correct your record when you had it taken care of. Take what documentation you have showing it was corrected to a lawyer and see if the lawyer thinks you can get some compensation for lost work because of the govt screw-up. I'm not a lawyer, but that is what I would do.
Some people just naturally bring themselves to the attention of law enforcement.