How long did you continue driving after the overheat incident?
Although overheating may exascerbate the gasket issue, it's "prolonged" overheating that will disable the head, gasket or both.
The engine can sustain the excessive heat for a short duration (or MB wouldn't bother having the gauge register the anomaly). It would be foolish to design an engine where the failure of a mundane $30 component would instantaneously require a thousand-dollar remedy!
I had a heater hose rupture on mine a few months ago, and it took a very hot day and eventual depletion of coolant before the gauge (and smoke coming from the hood) announced the problem.
As stupid as it may seem, I was less than a block from home, so I limped it into the garage.
I replaced the hose a week later, and so far, six months to the day, all is normal with the cooling system...and the head gasket.