Well, one thing I always have appreciated about children is that they just say what's on their minds...good, bad or ugly.
I would agree with addressing it directly, purposefully and immediately (as you did) by calling him out on being such a little butt (and I mean that in the NICEST Possible way of course) LOL... MY how rude... don't you know if you don't have something nice to say to someone, it's best to keep your trap shut? :)
I'll tell you a little story to hopefully just give you a smile... I had a party for my sister several years ago when my now 8 year old was about 2 1/2... to 3. We had LOTS of family there... and since my grandmother passed away when I was very young, her sisters have all stepped into her "grandmother role" in our lives. It's truly been a blessing for us. We were in the living room and my wonderfully thoughful, bubbly child walks RIGHT up to my great aunt and makes a face, turns a 180 to me and held his nose and said "SHE STINKS" I was oh so proud at that very moment.... I think you could have fit me in someone's shirt pocket.
Did I raise my child to say things like this out loud? No? Did he know to not say mean things -- actually YES... Was there anything I could have done about it? No.
I think it's just part of that filter that they have to learn when and when it isn't appropriate to say things... kind of like opening presents at Christmas in frotn of people. If they get something they've already received then they don't do the "I already have this" tone but to look them directly in the eye and say, thanks so much... this is great! I always told my son taht he can tell ME anything but if he doesn't know if it's nice or not to NOT say it outloud but to whisper it in my ear first. That has been a great source of him understanding what is and what isn't appropriate to say.
UNFORTUNATELY, that's not how all children are... I, personally, have never had to struggle with weight problems (for the most part -- more than 5-10 lbs here or there) but know PLENTY of people who have and it's something that is VERY personal and will strike to the very core of your soul.
Just like a previous poster said... my grandmother was quite overweight due to no exercise, poor diet, coupled with lots of health problems... and though I knew she was "fat"... when you truly love someone... it really DOESNT matter what's on the outside... it's what is on the inside that matters. And, that's not just something that "fat" people say... it's the cold hard truth. (that's a quote from a movie -- Liar Liar with Jim Carrey... wasn't trying to be mean)
Just pray for that child to learn from healing from the inside of his heart out. That's the only answer to this problem.. but at least it's one that WILL work. :) But having someone ridicule you... at ANY age still hurts...and for that, I'm sorry!