Just posting for info really, in case anyone else searches this topic and needs info.
Recently had problems with 1.7TD, started with intermittant engine management light coming on and engine hunting on idle, then clearing a few moments later.
Eventually deteriorated to management light always on after about 2 miles of driving, engine hunting on idle and very lumpy when cruising at 50 to 70mph, sometimes actually cutting out.
Eventually determined to check the crank sensor after eliminating EGR and MAF, went out and engine working normally (after resting overnight), started engine, disconnected crank sensor and exact same symptoms came on, engine hunting on idle.
Popped to local motor factors, new sensor for £40, replaced it and all ok so far.
Now the 'INFO' bit:
Interestingly the resistance across the broken sensor was 200k ohm, the new crank sensor was reading 1k ohm. Also noticed the crank sensor picks up metal swarf from oil system (being a small magnet), so maybe worth cleaning it every service?