Unless tomatoes, Parmesan cheese, and aged beef also give you headaches every time, then its guaranteed not to be the MSG.
I've long suspected any headaches or perceived ill-effects from MSG consumption are probably just sodium spikes from dishes made with a bit too much msg and salt, perhaps washed down with some not enirely quenching alcoholic beverage.