I had the same problem and since having a new throttle position sensor fitted the fault has gone away. To test if this is the problem when you next get the over revving problem - pull over and stop the engine - wait a few mins and then restart - it should be fine. This is a useful hint I picked up on the internet by another over revver!
Annie F
August 2008