Fix new enum scoping rules

This commit fixes the new rules for scoping enum variants under the namespace of their type.