this is a bit odd .... I'm not sure but it seems having this in the filter AST/compiler logic (compiler.js dust.nodes.filters) would be better.