Added new resolve predicate which does backtracking.