I don’t really understand why this bug happens to be honest.
The patch is already an improvement, but the beast is still lurking,
indeed.
This is most likely due to native compilation
which compiles the
unquoted lambda. Once compiled, it (presumably) fails to be passed
to
the external emacs process.
Attached is a patch that applies the same fix where affected.