Fixed #4701 (false positive unusedFunction when using templates)