Consider this example:
$zip = new ZipArchive;
echo $zip->getNameIndex(0); // 'bar'
echo $zip->getNameIndex(0); // 'false'
Unless you call save() in between, the unchangeIndex() call reverts back to the initial state of the archive - where index '0' did not exist.
If you called save() after addFile() and then renamed the file, you would be able to revert/undo the name change.