Tweaks to search template inheritance