fix: improved querylinks detection of matching tokens