CFY-1433 extract node instances building and handle both new instances, previous instances and removed instances in _handle_contained_in