Issue 11849 - Recursive enum causes segfault

https://d.puremagic.com/issues/show_bug.cgi?id=11849