The cop was wrong, period.

When I'm carrying and get pulled over, I tell the officer first thing.

When I'm not carrying, I don't mention it.

Had I been in that position, I would have told the cop to go ahead and take it, you're gonna look real stupid.