Avoid unnecessary reads when we've already reached EOF.