On a recent trackday I felt the car hesitate a bit under power, and got the above codes back from my Creator C310+ scanner. I cleared them, and the car has driven fine since, but I have the nagging feeling there's something brewing that could leave me stranded at a track in future. What's more confusing is that there were no lights on the dash, and no misfire recorded in the codes.

There's not much useful information available online about these codes appearing together on M54s, so I'm really struggling to work out what needs fixing. At a guess, I'd say that the water temp sensor had some kind of range reading issue caused by residual under-bonnet heat (although the gauge never moved from the middle), so had planned to change the sensor and thermostat for good measure.
Before I do this, does anyone have any smart suggestions? Is it possible that the second code was a result (torque limiting) of the first? Or are they completely unrelated?

There's not much useful information available online about these codes appearing together on M54s, so I'm really struggling to work out what needs fixing. At a guess, I'd say that the water temp sensor had some kind of range reading issue caused by residual under-bonnet heat (although the gauge never moved from the middle), so had planned to change the sensor and thermostat for good measure.
Before I do this, does anyone have any smart suggestions? Is it possible that the second code was a result (torque limiting) of the first? Or are they completely unrelated?