Fix Issue 12494 - to!string(enum) incorrect value