The D40 has a neutral switch just like the D22, but doesn't seem to be as prone to trouble. That doesn't mean it's perfect - I've seen at least one person with a bad NPS in a D40.
If it were bad fuel you'd have rough running, poor performance etc. You might have had an air bubble - if it gets hard to start in the morning (or refuses!) check the primer bulb, it should go quite firm in less then 5 squeezes. If it doesn't, you have a leak in the fuel line, most likely around the filter (most common place).
There's a chance it is the SCV, but usually that triggers a "safe mode" (without CEL) that needs to have the car turned off and on again to reset.
Another possibility - ECU earth, injector harness ... electrical connection woes are among the hardest to trace but the ECU earth in the D40 is a known trouble spot so look there first.