* automake.in (vars_scanned): Move near traverse_variable_recursively.
(traverse_variable_recursively,
traverse_variable_recursively_worker): Accept a $COND_FILTER argument
to filter out conditions during recursion. Don't recurse into
undefined variables. Don't pass empty results to &FUN_COLLECT.
(value_to_list): Remove, was used by
variable_value_as_list_recursive_worker only.
(variable_value_as_list_recursive_worker): Rewrite using
traverse_variable_recursively. Remove the $parent argument.
(variable_value_as_list_recursive,
variable_loc_and_value_as_list_recursive): Adjust calls
to variable_value_as_list_recursive_worker. Don't reset
%vars_scanned.
* tests/cond3.test: Don't expect empty helper variables,
we don't output them anymore.
* tests/cond30.test: Use an undefined variable.