Indeed. I'd forgotten that the flymake byte compiler runs in a subprocess, rendering locals overrides in the calling process useless. That at least addresses flymake.
Without a flag or bound variable to inform byte-compile-file to ignore no-byte-compile, elisp-byte-compile-buffer and elisp-byte-compile-file, which do run in process, fail silently.
Would be great to adopt the simple flymake change in master, if not also in 30 (I can hear the hoots of "it's too late for 30" already). The patch is not really practical when using a packaged Emacs. In the meantime, I'll disable no-byte-compile.