Fix KeyError in add_new_imapuids().