First post as a new memeber so I hope I'm putting this in the right place

Help / Advice

My car stalled today as I coasted towards a roundabout on a moderate incline. The road was busy so I coasted some 30/40 feet until I could pull in safely. I had coasted onto the rather large roundabout at more than 10mph so had enough momentum to carry me (plus the exit road was on a decline) to the pull-in.

Car started first time and drove the remaining 10 miles home. Checked codes and had P0734 'Gear 4 Ratio Incorrect' Pending. I've had some issues recently with the MAF (codes P0171 & P0174 (haven't come back since i cleaned it)) and a dirty Idle control Valve (now cleaned) and suspect the stall was to do with those (possible the MAF is on it's way out).
The only thing I did differently today was put in a higher RON petrol (97 instead of the usual 95).

My question is: Could this new code be to do with the fact that it stalled in gear and was coasted for 30/40 feet bearing in mind it's an automatic? Or, is it something entirely different? Any views on this would be appreciated.