Further fix to containment logic for swapping segment while not visible