Revert changes when ensure_clean_tree failed