Advance to next input record properly.