Fixed buffer cleaning with nested buffers.