Changed behavior for dict_scan: if the callback function returns 0 the scan