fix Issue 9977 - Function local templates should be allowed