Been down the road in it this morning after replacing the DPF and sensor yesterday and was just the same, we un-plugged the air flow meter and it ran ok.
We have already tried replacing the air flow meter with a new unit and it didn't make any difference.
Just on with removing the egr to check the condition of that and if it's sticking, will let you know if it makes any difference.