Sorry you had that experience. We traveled through PDX with a sippy cup full of milk for my 2.5 yr old just the other day. TSA agent was super friendly and let my son watch him test the milk. Gave him back his cup of milk, wished us a happy holidays and we were on our way.
The agent you met sounds like he's BSing