fix Issue 11926 - Segmentation fault when using const in an enum
Merge pull request #3098 from 9rnsr/fix11926

Issue 11926 - Segmentation fault when using const in an enum