When we have exactly 0 bytes left to search, make sure we stop instead of going into an infinite loop.