One hypothesis about why the script writes different things with and without --img_file= is that it was trying to work around some qemu issue which meant it couldn't cope with the initrd.
I can confirm that (if bug 658511 is fixed) qemu can now successfully boot the sort of image which you get if you remove the special-casing of the boot command for if [ $IMAGE_FILE ]. So if that was ever the reason for this behaviour, we don't need it any more.
One hypothesis about why the script writes different things with and without --img_file= is that it was trying to work around some qemu issue which meant it couldn't cope with the initrd.
I can confirm that (if bug 658511 is fixed) qemu can now successfully boot the sort of image which you get if you remove the special-casing of the boot command for if [ $IMAGE_FILE ]. So if that was ever the reason for this behaviour, we don't need it any more.