Broken whitepsace templating by gaff, somehow managed to work for a year. Fix it correctly. Closes 1410