refactor($templateRequest): simplify filtering out of transform functions

Closes #10264