Fixing resolve_template_function for 0.8.3 and greater