  For a semistable reflexive sheaf $E$ of rank $r$ and $c_1=a$ on $\P^n$ and an
integer $d$ such that $r|ad$, we give sufficient conditions so that the
restriction of $E$ on a generic rational curve of degree $d$ is balanced, i.e.
a twist of the trivial bundle (for instance, if $E$ has balanced restriction on
a generic line, or $r=2$ or $E$ is an exterior power of the tangent bundle).
Assuming this, we give a formula for the 'virtual degree', interpreted
enumeratively, of the locus of rational curves of degree $d$ on which the
restriction of $E$ is not balanced, generalizing a classical formula due to
Barth for the degree of the divisor of jumping lines of a semistable rank-2
bundle.
