Fix templating bug causing double includes of overriden templates