Bugfix: Resolve deadlock

When the "scanning" process restic runs to find out how much data there is does
not finish before the backup itself is done, restic stops doing anything. This
is resolved now.

https://github.com/restic/restic/issues/1834
https://github.com/restic/restic/pull/1835
