Merge "Fix refcounting in the rename case."