local: Ensure logging does not divide by zero in scanner.