[core] (re)add a retry when writing ISO files

* Fixes the issue that caused a revert of 0206e2036e382231f5219c160d69ec26f7fe7f89
  (in c93798b8779ef4fb65bacd7b8f6ed3f970593817). The issue was that an active index
  was being reused and modified, for ISO9660 images, which could wreck havoc when
  writing the data blocks.
* Closes #176 (again)