Fix for case where requested inputs and outputs are missing their derivatives.

It follows the policy now. If the policy is "error", then the error will have been triggered. If the policy is "assume_zero", then those inputs and outputs contribute to the Jacobian size, but those values are never filled.