Fix infinite loop when finding base class
Fix infinite loop when finding base class

I had the case that decl.baseClass.typeDecl is decl, moving the visited
assignment up fixed it (adding a check for decl !is decl.baseClass.typeDecl did
NOT fix it, so it might be a bit more complex)

rejectedsoftware/ddox,rejectedsoftware/ddox,rejectedsoftware/ddox