The engine block is a major earth point and the cause of significant troubles with anything ranging from alternator charge rate, glow plugs, injectors, starter and the numerous sensors.
If it's behaving oddly in neutral it could be the NPS although I wasn't sure that was ever an issue in the D40s. Here's something to try though: start the car in neutral and notice the idle @ 750rpm. Now, put the car in first, do NOT release the clutch. Idle speed? If idling high, push the gear lever to the left (leave it in first, you're just pushing the lever sideways in the 'first gear slot'). Doesn't matter left or right, do both - but does THAT change the RPM? If so, it's definitely a neutral position switch thing in the gearbox, but I'm wondering why it's raising the RPM. The D40 shouldn't do that.
I'd also go past all of the injectors and rip the electrical connection off - I wouldn't use plastic explosives, mind you, something a little gentler might be cheaper in the long run. Put them back on, this will help clean the injector contacts. Do the same for the pressure sensor's connector, take it apart and put it back together (repeat 2 or 3 times if they look dirty inside).