Only call cleanup_set() if keep_partial is set.