we resolve the template redirects twice here, maybe you can store it in a local variable