Scan for targets before iterating over targets.