As odd as it sounds I had the exact same issue with my gelding. It took me months to figure out what I could try seeing as how it was my first time ever training. Eventually it hit me to try using different bits. I went from a snaffle to a grazing bit. The behavior stopped for a while but not long. When he started it again, he also started throwing his head and snorting like your horse. Switching bits again I took something into consideration, my horse has a smaller mouth. So the curb I bought was extremely light weight. This solved the chomping and biting issue, but he kept shaking his head and such. That's when I took something else into consideration, he has a longer neck. The horse I had learned to ride on was short necked so I got use to having shorter reins. With my reins pulled up I was making constant contact on his mouth thus irritating him. After giving him more rein he stopped throwing his head, and even stopped rubber necking.
Also if you say it only happens around other horses you may be wrong, (not saying you are
) I thought the same thing because he didnt do it constantly, but I was wrong.
Im not sure if any of this could apply to you but if your horse has a smaller mouth try a lighter weight curb bit and if he's long necked give him more rein, esspecially if he's well behaved. Past that I would go with the Cat's suggestion and get his teeth checked again. You never know what someone might have missed in their mouth.