changes made to template detection for include rules