an extra guard in typedClassDef

Necessary for tests like pos/virtnew_abstracttpe.scala to work.