Added test for backtracking.