I'd check the fuel pressure. Some times you can get fault codes on the way by while the engine is stalling for other reasons. Also major vacuum leaks.
I had an issue with an O2 sensor that had the wire splices in it rather than a new wire all the way to the plug. Those little gray screw connectors didn't keep contact and it caused a similar situation on a 535.