I don't like working around the nested step structure by calculating ranges explicitly, but it's better than not having process while generating the index. We'll have to refactor this later.
Originally posted by @jluebbe in #1734 (review)
Perhaps we can add a way to reset/abort the progress step for the adaptive update, so that the fallback to normal copying produces proper output. That may mean that the percentages are no longer monotonic, but one could argue that this matches the actual progress better in this case.
Also, we could look into having g_auto based cleanup of steps.