Fixed bugs where enum variants are considered variables

Closes https://github.com/PistonDevelopers/image/issues/151
Merge pull request #153 from bvssvni/master

Fixed bugs where enum variants are considered variables