The code that tried to work out when an item was moved off the end of one page, and onto the next/previous was broken in several ways.
1. It tried to deal with up/down moves, but there was at least one off-by-one error.
2. And it gave notices on the last page, when the last page was not full of items.
3. And it only worked on the first list, when there were several on a page.
4. It did not consider right and left moves at all, but if you move the first item on page 2 right, it becomes a child of the last item on page 1, so you need to switch pages, and vice versa.