[diag] Issue 11727 - Repeated error message with using forward referenced enum as variable

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