* lib/Automake/Variable.pm (_do_recursive_traversal): Do not update @_substfroms and @_substfroms for undefined variables. * tests/substre2.test: New file. * tests/Makefile.am (TESTS): Add substre2.test.