PetScan::scan_arrays: keep track of handled types in set of TypeDecl pointers