kernel: add promising "fix loop discard errors" hack