The dcb_foreach function is not safe to use from multiple threads at the same time. This should be asserted by checking that the function is called only from the main worker. The addition of this assertion also implies that only administrative operations should use the dcb_foreach function. To accommodate this change, the KILL command iteration needs to be adjusted.