This `addFilter` call being in the `template` helper means that filter gets redefined every time we render a template, which seems unnecessary. I think this is probably the wrong spot for that.