Might be a bit late but Im pretty sure the template is equal the same as !important with css. Have you tried giving your buttons you want to change a class ID. Then it might differentiate the 2 buttons enough?
I have had issues with having template footers and headers and have hacked it together with this process.