CSPACE-6333: Move repoSession.save call outside the loop, so it doesn't affect the search results each time through the loop.