fix Issue 13142 - Enums on different classes confuse the compiler
Merge pull request #3779 from 9rnsr/fix13142

Issue 13142 - Enums on different classes confuse the compiler