refactor the algorithm of sequential updating of nested segments if all of them have some resolving