Fix  Issue 12494 - Regression (2.064): to!string(enum) returns incorrect value

I fixed it as trivially as possible: Code reuse => less bugs. @AndrejMitrovic : This look good to you? Did you have something else in mind?

This is a regression. What's the status on the 2.065 branch? Is there a 2.065.1 candidate?

----
I can't squash from this computer, I'll do it tonight. Please don't merge before that.