I have proposed a fix for the problem I found, but from everything I’ve found so far the component that was performing the mangling only affects the saved record and doesn’t affect the incoming mail during processing.
I’m reasonably confident the source of the trouble must be something else, but I don’t yet know what it might be.