- Fix a race condition between the flushing and releasing of the index when the window is closed and the flushing by the indexer, by making sure -_cleanDirtyLogs retains its index and enters the closing group. This caused a crash.
- Fix an issue where _remainingLogs gets out of sync with the number of logs still in localLogSet when the log fails to parse. This caused an infinite loop and stopped the indexing from ever finishing.