[DF-1464] Fix visibility tool memory leak