Fix the build for namespaced enums

Fix the build for namespaced enums. Enum variants must now be referred to like EnumName::EnumVariant, instead of just EnumVariant, unless the EnumVariant is explicitly imported with 'use'.