Remove duplicate rows from simple pagination

As discussed in #4977, this removes the one extra record that will be repeated on the next page.