Main window: Fix page drag-n-drop when drag-n-dropping the last page of a document

Signed-off-by: Jerome Flesch <jflesch@gmail.com>