Issue #18344: Fix potential ref-leaks in _bufferedreader_read_all().