By default Grub will install the bootloader (UEFI, or MBR) which was used to boot the current environment.
This information have to be made available to the restore script, which can then use the --target parameter to force the right installation method.