Remove use of shadowed lifetimes