Fix edge case of circular reordering of prev-item ids