templater: makes branches work correctly with stringify (issue4108)

--HG--
branch : stable