BZ1047879 - GRE regression in handling nested enum values. More tests and fixes.
(cherry picked from commit 331c9b68c11b3677f8cbe38261ebb47b70ec8a76)