Code cleanup for zhash_rename