Ok, you've changed the extension from .mbz (which stands for moodle backup zip) to .zip and unzipped. Right?
One could remove the references in the .xml file and also make sure there are no references to the content hashed folders in the course_files folder.
Once it's corrected, re-zip. The moodle_backup.xml and other xml's must be at the root of the zip file tree.
Let's say you un-zipped and made edits/corrected in a 'test' folder. To make a valid zip one must use the zip command while in the 'test' folder. Those .xml's will then be at the root of the archive when un-zipped during the restore process.
After zipping, change the extension from .zip to .mbz and then use the .mbz to restore.
You just reverse the process you used to inspect the .mbz backup.
Folder for the edited moodle_backup.xml etc. is 'test' ...
cd test
zip -r * somebackupfilename.mbz
-r does recursive ... gets all files folders in the 'test' folder. The extension .mbz tells the zip command to save the file name that way. It's still a zip.
'spirit of sharing', Ken