EncodingConverter#primitive_convert clears the source buffer.

https://github.com/ruby/ruby/blob/trunk/transcode.c#L3761.
This fixes infinite looping in the active_support master test suite.