The simplest fix right now would be to prepend your coderef
with the python comment symbols # |hello| so that at the very least it
won't break your tangled files.
Actually, that is exactly what I have done as a quick fix. It has a minor inconvenience: anything else included on the line is colored as if it were a comment in the final PDF, and I intended to add a symbol to mark the reference. Not a big deal, but it looks different than intended.
I would like to see this implemented,
so let's see what Nicolas has to say.
I would like to contribute something. Maybe a test to show what is the behavior to expect. Thanks for your reassurance that this is not an error on my side!