I haven't yet encountered a put down that can't be used as a stepladder for your own status.
When someone comes along and goes "hey this guy is a dick head" what they are actually saying is (unbeknownst to them) "hey dude, I'm making myself into a social step ladder just for you - step on me right now and elevate your status above mine!"
All you have to do is do it
Any time someone puts someone else down, they are setting themselves up to be publicly humiliated. All you have to do is bowl over the pins.

No one likes someone who puts other people down - just treat them like they deserve to be, and move on.
Your behaviour was perfect, and I think you can see that from the outcome. You don't need any advice on that. You just need to be told you're already doing the right thing.
