IE already has a solution.
Compatibility mode.
Compatibility mode.
In a way this solution is compatibility mode. "Broken" detection scripts see version nine (which is good enough), scripts that know about Opera 10 sees version 10.
Think about the people who have to deal with the UA string for legitimate reasons (analytics...) they will have to deal with a special case (if (UA == "Opera/9.80...")).
It's seems a bit like a ugly hack to me.
The only way to make it work reliably is to look at the window.documentMode property which requires changing your code, thus defeating the point of the compatibility mode in the first place.