Do not use $path to test for deprecated template names, use $tpath instead

Alternatively, drop the deprecated template checking down to actually be a
fallback rather than the first thing that is checked.