Fix for keyword substitutions for enum properties. Check came too late evaluating the substituted value to a string instead of an enum value. (I found the problem in writing-mode)