What engine was it? It is unusual for an engine to runaway from idle unless it had picked up a gas like stated above, our fuel/oil went directally into the intake. The Hazmat guys that come to our work to vac out bad gas, diesel, oil, or whatever, use an exhaust extention on the pump on their trucks because the trucks engine can at times... . catch a wiff

And sceptical me actually got to witness that, pto was set at 1200, with a celect plus cummins engine, you are going to sit at 1200 if you ask for it. The guy was pumping out gasoline, and at times you could hear the engine just sniff in the free HP in the air... . yikes
If the engine was mechnical, and was an old pt pump cummins like the 855 or l-10, you might be able to make it do that a little if some how the AFC got air on it, or if there was an all-of-the-sudden restriction in the return line (neither likely) I wonder if the unit has air controls... ..... Wait a minute, brain fart, there is a unique engine speed control that was used on the old PT pump engines that used air to run a valve that jacked-up pump pressure to raise engine speed for extened idle/PTO operations. I was working on a bus that had one, they capped off the return line on the engine speed control, which caused a huge back-up, that allowed max fuel pressure at any throttle posistion

Real scary, insane RPM's, tons of smoke, but IMHO if that went wrong on that excavator, it would have locked-up in less than 10 seconds.
Sorry for the chatter,
Russell