Fix nl_func_type_name for template functions.

Fixes SF#546
Add two other function template patterns to the nl_func_type_name test.
Add some logs that were useful in fixing SF#546