Update templates to expand their arguments only once, when they are used