fix Issue 11039 - Undefined instantiation from circular imports

Fix http://d.puremagic.com/issues/show_bug.cgi?id=11039