only retry scanning when overflowing the scanner buffer