I understand exactly what you are saying b/c I myself am capable of doing it. He is being defensive and lashing out in the best way he knows how its just that he has the intelligence to know exactly where to hit metaphorically. This seems like a frustration in not being with intellectual peers but age mates. Some social skills and role playing may be needed. He may need to be shown or taught empathy and how to put himself in their position. It is not always simply absorbed. He is a smart little fellow but still just very young.