clean-up in t4 templates
(cherry picked from commit 2cf9d0b837a1926764030ddb5ba509c44e39402f)