testcase for backtracking lookup