[AutoDiff] Enable differentiation wrt "subset indices". (#23887)
Remove this error: `function is differentiable only with respect to a
smaller subset of arguments`.
The differentiation pass (and "minimal indices" logic) actually supports
such differentiation wrt "subset indices". All that is needed is to remove
the deprecated error.