Fixes template references in includes