When the Coast Guard boarded me, at sea, out of sight of land, they were definitely looking for drugs. They came aboard armed. They did find a weapon on my boat, one with a lot more firepower than a handgun, I might add. Nevertheless, they were extremely respectful the entire time they were aboard, upon being satisfied that it was a legal weapon, they made nothing more of it.
In fact, determining if weapons were aboard was their very first question. I have a feeling it usually is, for the safety of the boarding party.
Your assertion of what may happen when official searchers find weapons could well be right for most LEO's, I mention this incident to make the point that it is otherwise, in my experience, with members of the USCG.
You make a good point. If the guns are legit and they ask if you have weapons. Common sense should dictate that you immediately tell them that they are there. In my mind that should signify to the USCG that the person is upfront and not trying to hide something. I would think that would set a better tone for the rest of the search.