While iterating over zk nodes with node IDs from the from the node
cache, there can be runtime errors when the cache was updated during the
iteration process.
(``RuntimeError: dictionary changed size during iteration``)
Avoid this by iterating over a copy of the node IDs, rather than the
dict_keys directly.
Change-Id: Iecd88b4484cf48ea2127348bfb2905443eaaf49f