improve is_grub_broken()

the previous version crashed when devices.map had multiple devices