Enum to name is Broken

I always have this bug on 4.10. And in a function the workaround does not seem to work. It works only if you pass your variable in a litteral enum …