Handle catastrophic backtracking