Fix matching for distant images.