I've replaced grubx64.efi from 16.04 with the one from 17.04 and problem went away. This means that problem is indeed in grub or grub in 16.04 doesn't have needed workarounds for faulty firmwares.
I've replaced grubx64.efi from 16.04 with the one from 17.04 and problem went away. This means that problem is indeed in grub or grub in 16.04 doesn't have needed workarounds for faulty firmwares.