Peter,
I cannot speak from experience of your model, but only from what I have read, as my vehicle is an x244 2.8JTD.
One cause of intermittent faults on x250s that repeatedly crops up is the engine block earthing strap, which can look OK but be corroded internally. As a quick check, the application of a jump lead between battery negative and an engine lifting lug can be useful.
If the starter cranks the engine, but the engine does not fire, the key code system is a possible suspect, at least on the x244 there is no connection from the key code system to the starter circuit. One reported elusive cause of key code failure was an intermittent fault on the short screened cable between the code receiver and the key detector on the ignition switch assembly. Have you checked whether the key code light goes out? In moments of stress we do not always think of such things.
If the starter does not crank, then check the battery connections both positive and negative. I have read about loose fuse connections on top of the battery, and a cracked battery positive clamp. All points to eliminate.
Another hidden fault was a loose nut on the thick positive supply to the engine bay fuse and relay box. See below.
When checking battery positive connections do please disconnect the negative first.
I hope that one of these suggestions may reveal something.