Use isinstanceto check is_independent.
Merge failed leaves into siblings.