Avoid a potential hang when --remove-*-files is active.