There is no MAF sensor on the navara zd30 engine. its MAP only.I had an interesting problem similar to your description.
Engine light flashing on, restart was all good and then suddenly go doughy and light come on.
Long story short, check the physical condition of the MAF sensor. Mine had a pinhole in the membrane which stuffed up all the parameters. I found it when I squirted MAF sensor cleaner in every orifice except mine......
Sealed it with a dob of silastic and away she went.