MEDIUM / Attempt to fix infinite loops or stack overflow while handling
logs (see MODULES-170)