Hmm. Sounds like some sort of sensor problem is likely. As well as the MAF (by which I assume you mean the big airflow meter on the induction pipe near the air filter box), there are sensors on the air box itself and the inlet manifold. Have you had a play with these too? The one on the manifold is apt to get dirty, especially if you still have your EGR mechanism, so taking that out and giving it a clean with carb cleaner can help.
The other thing I've found with TD5s is that they're a bit vulnerable to fuel availability and pressure. Mine's a bit flat when it is just about to run out of diesel, for example. Is the fuel filter reasonably fresh, and are its rubber seals in good condition and sitting in their grooves properly? Is the fuel pump picking up and delivering fuel sufficiently well? The mesh at the bottom can clog up, and sometimes the pumps themselves lose the ability to deliver the 60 psi the TD5 engine prefers, even though you can hear them running. Is the fuel pump relay (typically one of the yellow ones under the driver's seat in a defender) in good condition. When I was suffering from a fuel starvation problem just after Christmas I found I could change the engine speed by waggling the pins on this relay, so I replaced it.
Anyway, that's a few more things to think about. Have a tinker and see what happens.