TANAL-60: fix logic in try-best-match