It is a hassle, but these are exactly the conditions that they are trained to look out for. BTW, carrying a perfectly legal gun would be the perfect cover for explosive residue, hiding a bomb elsewhere in your luggage.
Do you mean like in the pocket of my purse designed to carry a concealed weapon? That would seem like such an obvious thing to look for.