Stuff like this makes the loop more elegant to implement as a for loop. "continue" in a for loop will still execute the "move to next item" command and check the loop invariant.