Fix regression: dict changed under iterator

Kovid: I would *really* appreciate it if you could slipstream a new release with this change. Otherwise a very large percentage of CC users will be broken.

And no, I didn't think to test deleting a book. Sigh.