Thanks for the tool - it was useful in fixing 2 folders. For the last one, we had to remove it, create another in WebMail, move the .grp files there and rebuild again.
We are indeed on the latest SM 17 build.
I do think that this task, as well as any other user-initiated task should be logged. Moreover, this process in particular should have a progress bar somewhere - of if that is not possible, there should be a status on a page, like:
Folder / User rebuilds status:
| Email | Folder | Status |
| firstname.lastname@example.org | test | Rebuilding in progress |