THRIFT-2513 clean up enum value assignment

Client: Compiler (General)
Patch: Konrad Grochowski

Fixes the failing test with pure_enums. For details, see JIRA ticket.