Why would a child be null here? If a child is null, it should be removed from the parent either in module land or JS land. This seems to be a workaround to the main problem.