Prevent systematic lookups in the interpreter when asking typedefs

looking into the list of classes, protoclasses and enums before.