This seems to happen when you edit the last post on a page (That was the 20th post on page 1). I think it should be straightforward for the code to
figure out which post is on which page and usually it does except when you edit the last post on a page.
It's a pagination bug and it's not just when editing a post. If you try to go to that post from your post history, it'll come up with the wrong page
number for the post id. I haven't bothered experimenting but it seems to have something to do with the sizes of the posts rather than the number of
posts per page.