Avoid modifying the dict we are currently iterating over.