1. Delete the <permanentDirectory>/lucene folder to start fresh
2. Start XWiki and go to Administration > Applications > Search
3. Refresh the page and wait for the initial index to finish (Number of elements in indexing queue = 0 and Number of indexed elements ~= 430)
4. Select "Index the wiki" and press "Start Indexing"
5. Re-open the page and check the indexing status, it will always be Number of elements in indexing queue = 0 and Number of indexed elements = 0
6. Repeat step 4 and observe the "Another rebuild is in progress." message.
Workaround: Delete the lucene folder and restart XWiki (Steps 1-3).
Note: If you are on a multiwiki environment (XEM), using the "Index Farm" option works every time, so the problem is related to the "Index the wiki" option.