basis.template: small performance improvement