What if:
remote: delete message from dir a (label a should later be removed)
remote: message is added to dir b (e.g. archive -> delete inbox, add to archive)
sync: processing adds, notices that message has label a and is now present in dir b.
sync: adds label b to message
sync: notices message has label a but is not present in dir a (not valid location) -> adds message to dir a