Ever hear, sleep with dogs, you get fleas?
This is what happens when you don't care if your friend is a thug,etc.
I don't think the police did anything wrong. Plus, you couldn't even show him current proper ID.
If you want to hang around with idiot felons, you shold start practicing now...