You might want to evaluate the diesel electronics for codes. The procedures are outlined in the DIY article. Your car has electronic control of idle and I have seen OVP relays cause these systems to die causing idling problems. With the system dead it still diesels but often very slowly (at idle - no effect off idle); a sudden turn of the steering wheel or A/C compressor cut-in can stop it dead.
Bosch Master, ASE Master, L1
33 years MB technician