Thermostats can be tricky blighters as well, back in January my old 5 series overheated about 3 miles from home, following a cold start. Recovered to our local garage.
Thermo. suspected, but when tested by immersion in hot water it operated fine.
Replaced as a matter of course, no further...