ENH: use advance_iterator instead of next for compat with older versions of six.