fix Issue 11849 - Recursive enum causes segfault
Fix ice with recursive definition of enum base type
Merge pull request #3057 from 9rnsr/fix11849

Issue 11849 - Recursive enum causes segfault