fix issue 10259 - ICE on invalid compile-time class instantiation

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