Set new_rev var to avoid reference before assignment

Resolves a concern raised by @jasonrm in #11596. This should also make #11595 ready to close.