Resolve Ordering Error

Hi everyone, I’m facing an issue while trying to set the status of article pages. While its possible to switch to “draft” or “published”, when trying to set a page to “unlisted” I get the error “Cannot move page directory”. I tracked this down to possible issues in page numbering and it turns out that there is in fact at least one duplicate number. As I’m dealing with a lot of pages (~1000) I can’t easily fix this numbering issue manually by renaming the folders in the correct order. Is there a way that Kirby can resolve this on its own?

As a possible related issue, there is also an article page that I deleted a while ago that keeps reappearing as a draft. Has anyone faced similar issues and found a good solution?