Fix bug where enumerated values were not treated as constants