Fix generation of enumerations

Enumerations are only generated if the variable has more than one
special value. Certain "invalid" names of special values are ignored for
the generation of the enumeration literal.