Fix infinite loop in DecodeStream_ensureBuffer()