Do for renewitem what was done for checkoutitem in previous commit.