[Resolver] When calculating the template param-dependent hash for resolution result caching, don't take same template parameters twice