fix nested folds with consecutive done-groups at different nesting levels