Allow accessing a defined helper from a template

Addresses #2840.