Just a guess - but it sounds like a VW Golf TDI - this is also a drive by wire engine, and has a brake-operated switch, operation of which cuts the engine back to idle. With the brake pedal held down, it idles normally, but when the throttle is also pressed, the revs rise a little and go no further. I bet a BMW drive by wire engine has a similar safety device - if the throttle sensor failed to give full throttle, the driver would naturally hit the brakes, when this switch would save the day. I would have a look at the brake pedal, and disconnect the switches - one will be for the brake lamps, and perhaps there is another as a safety device. I do not know if the EML light would react to such a fault, but assuming there are no air leaks in the inlet bellows, a code reader would be handy.