Minor refactor of __advance method to make it easier to understand.