I was flying back home with a small jar of peach jelly purchased at a county fair in TX. TSA guy grabbed it and said there is a specific prohibition against jars of jelly. I said, no, the prohibition is against jars of gel. After 4 security/TSA folks got into a debate concerning whether jelly is a gel, I solved the problem same way you did. Threw it away and moved on.
TSA agents are not known for their ‘nuanced’ perspectives.