I cannot play it using simple Emacs. Actually, I had this exact problem, but my problem is that I had require-final-newline set to t. Therefore, Emacs added a new line at the end of my template.
My setup is a little more complicated, but the solution for you is probably to set mode-require-final-newline to nil and restart Emacs.
To verify that this is a problem, open the template and check the final new line.
source share