update-index: fix cache entry leak in add_one_file()