Fix TemplateLocation.anyExists logic

Fix broken logic in TemplateLocation.anyExists caused by not using the
local `searchPath` variable.

See gh-2184
Closes gh-2248