Issue 13142 - Enums on different classes confuse the compiler

https://issues.dlang.org/show_bug.cgi?id=13142

@WalterBright @yebblies and others: I'd like to merge this diagnostic improvement in 2.066 release, because issue 13142 was originally reported as regression.