Fixing tests. Create commit points only if the index was flushed to disk.