lib/core: Fixed bug in `BytesIterator::init with_buffer`