Would it be legally defineable for Mozilla (or any other trademark owner) to permit unapproved patches, if and only if they do not change the user interface? In other words, the patched version and the official version appear and behave exactly the same to the user when they don't crash or hang?
Presumably it could also be possible to design logos with such patching in mind. A Firefox icon with a strip for a "patched by <distro name>" message/ warning / disclaimer. That's similar in concept to the "tainted" kernel you get when you load closed-source modules.