I agree with someone above, if his behaviour has been impeccable to now I wouldn't worry so much but look to perhaps something else going on?
Your boys are very intelligent right?
My friends 9 yr old son is extremely bright. Always an exemplary student and straight A's. She was absolutely furious when one day she got a call from the school because her son played a 'prank' on the teacher (pulled the chair away before she sat down) and the teacher got hurt.
It was completely out of character for her son. But I think a lot had to do with peer pressure and trying to fit in. Unfortunately smart boys cop flack as they get older for being 'nerdy' and sometimes they have to try and 'prove' themselves to the other boys with behaviour they normally wouldn't do ... just a thought?
I recently got a book called Smart Parenting for Smart Kids. It is really basic but really simple and has case studies of kids using common problems smart kids generally encounter. Maybe you could read it for your boys.
I don't think it is your son's fault.
I used to get picked on a lot by certain teachers, my parents always listened to my side of the story and then took it up with the teacher if required. The same thing happened to my brother, who is really similar to me. Once he was accused of stealing someone's ipod from their bag because earlier in the day he had gotten a redskin out of his mate's bag and this was on camera. He insisted it wasn't him but the principal lied and said he has watched the entire tape, and that he had seen my brother in the tape with the ipod. Of course they couldn't find it on him because he hadn't done it! They kept him in the principal's office all day interogating him and didn't even call my parents. My parents were furious because my brother doesn't lie, and demanded to see the entire surveillance tape, at which point they all saw another kid take the ipod.
Teachers aren't always in the right. And kids are often not respected the way they should be in schools, especially smart kids. (and from what I have read, boys have it harder from teachers too).