> when `CopyBufferToNginx` is called, after `done_called_ && last_buf_sent_` are set to true? 

But the code has:

    ngx_int_t NgxBaseFetch::CopyBufferToNginx(ngx_chain_t** link_ptr) {
      if (done_called_ && last_buf_sent_) {
        return NGX_DECLINED;
      }
      ...

Oh!  We have in `CollectAccumulatedWrites`:

    if (rc == NGX_DECLINED) {
      *link_ptr = NULL;
      return NGX_OK;
    }

I was missing that.

Ok; this code is good.  If `CollectAccumulatedWrites` gives us a null output we shouldn't pass that along to later body filters.