a little cleanup of list_deriv_vars handling