[#2026] Fix cleanup for test_segments cleanup as link.