Fix crashing/freezing related to dictionary updates.