Use _try_inline_read instead of _read_from_buffer in read_until_close.

Closes #686.