Issue 12040 - Compiler segfault with circular reference in variable type

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