fix Issue 11849 - Recursive enum causes segfault
Fix ice with recursive definition of enum base type