Sometimes a hook manipulates the config tree, which makes currently running iterators point to freed memory. As a workaround, make two copies, one for the iterators and another for the hooks. BugLink: https://bugs.launchpad.net/bugs/1008600 Signed-off-by: David Henningsson