a friend of mine was flying out of washington dulles international airport (iad), and encountered a tsa agent who just was not being very nice.
the agent made him remove his laptop from his checkpoint flyer, even after he explained that it was in a checkpoint friendly case.
this agent also made a mother dispose of breast milk she was carrying for her child.
if you run into this sort of situation, my suggestion would be to ask for a supervisor. it may take them a moment or two to get someone there to assist, so keep in mind how much time remains until your flight departs and how long it will take for you to get from that security checkpoint to your gate.
the problem is that most of us are in a hurry when we go through security. i've arrived at the airport within 30 or 45 minutes of my flight on more than one occasion. the result is that us not having the time to prevent this sort of behavior from a tsa agent just reinforces their behavior.
having said this, i would also say be careful when you're abroad. i had a very bad experience in doha, qatar - and i won't fly through that place again.