I've encountered weird regression. Here is the description:
1. Since some time, `config->includeFolders()` contains folders with trailing slashes.
2. First entry that `QDirIterator::path()` returns matches exactly its argument, i.e. if we feed it with path with trailing slash, it will return exactly it. All the other paths don't have trailing slashes though.
3. Because of that, inside `UnindexedFileIndexer::run()`, when we check whether path has changed, we perform comparison `it.filePath() == tr.documentUrl(id)`, and it fails becaue `documentUrl()` always returns path without trailing slash.
4. So we call `DocumentUrlDB::replace()`, which removes old entry and calls `DocumentUrlDB::put()`.
5. Finally, for some reason, `IdTreeDB` don't want to work with paths with trailing slashes, so it gets silently ignored.
So in the end of the day we get entry for `includeFolder` removed from DB. Which corrupts `IdTreeDB` --- it can no longer resolve paths.
The simplest solution proposed here is to make sure our `DirIterator` always returns paths without trailing slash, including first call.