Fix new enum scoping rules

This PR fixes the library for rustc's new enum scoping rules, where enum variants are namespaced into their enum now.