Ford C-Max - faulty engine response - grumpy1

I have an old ('04) Ford C-Max with a 2.0 diesel engine which I believe is pre DPF.

The car has an engine problem which, though very intermittent, is potentially dangerous. The last two times it happened were both at junctions, the engine idling as I waited to pull out into a larger road (in one case a fast A road). When there was a space I moved to drive forward but the engine failed to respond to the accelerator. It didn't stall but remained at about 1100 rpm, enough to move the car slowly forward as I tried to get it to the side of the road and out of harm's way.

The car had a major service carried out within the last fortnight, and most of the time the engine runs fine, but knowing this fault can occur at any random moment is very alarming. If I take the car to a garage the chances are it will run perfectly. Can anyone provide a clue as to possible areas to investigate?