With ds1, I never knew for sure if it was the lactose or the proteins, I just eliminated it completely. He outgrew his egg allergy around 4yo and by 4.5yo he was back on small amounts of dairy, building up from cooked milk, to cheese to yogurt then finally just milk.
Gastric problems are really common amongst tongue (and lip) tied kids. The tongue is attached to several muscles (8 I think, but don't quote me) and if these muscles are not being correctly stimulated during chewing and swallowing, then it can have a knock on effect on the entire system.
If I were you, I would investigate the whole tongue tie issue. Educate yourself about the possible effects it can have and make a decision about whether to revise or not. Top tip, skip the NHS, they are clueless about this.
Just to give you some idea, as well as the gastric problems, ds1 suffered from many different things related to his ties (anterior, posterior and upper lip tie) Including poor sleep, with bouts of apnoea though probably not enough for a diagnosis, ENT trouble with congestion, noise and hearing loss which persisted for several years, fussy eating with gagging on certain textures, mouth breathing and large tonsils.
He also has a high palate. The tongue shapes the palate, it should be broad with a very wide U shaped dental arch. Ds1's was very high and extremely narrow because his tongue action was restricted. When we saw a dentist who specialises in tongue ties, he said there was already evidence (aged 7yo) that his bottom jaw was becoming bigger than the top jaw, he had an open bite at the front from tongue thrusting and a cross bite at the back. Also, he said the middle section of his face was very flat, hence the mouth breathing as his nostrils were very restricted. He also had a curvature in his neck, possibly from holding his head in a way to help his tongue, which had a knock on effect on his hips and ankles.
We are a year on from that now, and he's responding very well to the palate expander and headgear which had brought his upper jaw forward. He has stopped mouth breathing and sleeps like a dream now.
I would never have believed that all of this could be caused by a tongue tie, but I have heard similar things over and over from parents of other tied kids on the facebook group that I am on.