add testcase for r208237: do not collect undef terms