See T259210
1. PoC from task:
Unable to compile LilyPond input file:
line 6 - column 1: Spurious expression in \score
2. Again, using raw=1:
3. Notehead stencil hack PoC, contributed in comment from LilyPond developer Han-wen Nienhuys: