Fix enum-containing value comparisons