As this entire macro is TT code, it might be clearer if you use a single `[% ... %]` block, and separate statements with `;`.