Fixes

A couple of obvious fixes to the code and to the generated SEPA XML file headers.

(The last patch in the series might be slightly less obvious, but should be pretty uncontroversial as well.)

The two code fixes seem necessary to make the whole thing work at all...