Fixed missing closing of LocalRepoManager.