Fix bug parsing out expressions for enumeration types
(cherry picked from commit ef17fb6452ef2b008ef4143c32f431f96125e831)