Try to minimize database accesses from the indexing manager. #137