Use more compatible iterator advance.