Fix: a minor bug in handling invar/var types for enum values;