The sandbox caught this and the local run did not: ctypes.create_string_buffer in
an expression is collected as soon as the statement ends, so the address handed to
the encoder dangles and the memory is free to be reused. Locally the freed bytes
still held the raster; under the build's allocator they did not, and the encoder
was handed garbage -- 'block (0, 0) came back as (27, 0, 30)'.
Same class of bug as the two the encoder itself documents, which is why the helper
now owns the buffer and says so.