make enum more robust

Eventually we will need to simply evaluate the expression and flattening
list context. Right now this is not possible, because enum is used in
the setting before Pair is defined.