BZ941 Fix for rewrite on outputstream with large sizes/fragments