Ok I have a test case for fw 3.1.0 (d1b2f00933) that demonstrates the problem with the way kpg.exe is applying the footer patch:
When I apply the above patch with kpg.exe, the new footer is ignored on my Glo. However if I apply the patch using my own program which terminates the replacement string with a null character, then the new footer works as expected on my Glo.
The reason the kpg.exe applied patch is being ignored is that the end of the original string is still being read after the replacement, and so the clause in the original with the [deviceCodeName="kraken"] overrides the new footer, and I just get the original footer.
Edit: I should note for anyone trying this out that my program uses a slightly different syntax in the patch: instead of "replace_xor_58 = ...", write "encode_xor8 = 58" followed by "replace_string = ...".