Fix problem where less matches were found due to iterator craziness