The problems here appear to stem from the terrible parsing in os-prober's grub2 handler. Fixing this is complex, but should be doable. However, I will need to think about some other practicalities as well. Since we may well need to cope with current grub.cfg being parsed by old os-prober on other systems, it may be necessary to contort the syntax a little so that it doesn't confuse older versions of os-prober quite so much.
The problems here appear to stem from the terrible parsing in os-prober's grub2 handler. Fixing this is complex, but should be doable. However, I will need to think about some other practicalities as well. Since we may well need to cope with current grub.cfg being parsed by old os-prober on other systems, it may be necessary to contort the syntax a little so that it doesn't confuse older versions of os-prober quite so much.