make the halting-condition of resolve_types well defined