Fix TextStream::readAll() bug (infinite loop).