Implement cached Jacobian (when impl_jacobian is overriden).