discover/grub2: Do not set $0 in functions