40grub and 40grub2 have entry_result () { if [ "$ignore_item" = 0 ] && \ [ -n "$kernel" ] && \ [ -e "$mpoint/$kernel" ]; then result "$rootpart:$bootpart:$title:$kernel:$initrd:$parameters" found_item=1 fi [ -e "$mpoint/$kernel" ] will always be false since the kernel is installed under $mpoint/boot, not $mpoint.
If it was really wrong, 40grub & 40grub2 would never work, while they do. If you read the code more carefully, you'll see that /boot/ is actually in $kernel varialbe; so $kernel includes the path from / to kernel, not only the kernel name. If the code doesn't work in some situations, the bug is somewhere else.