#249532: Allow subthemes to have preprocess hooks without tpl files; code optimized and expanded to mean ALL hooks.