[BUGFIX] indexed_search: in some cases indexing does not work