“Mā ḥaḍara Khālidun” only denies Khalid's attendance. “Mā ḥaḍara illā Khālidun” affirms his attendance while excluding others: this is restriction (qaṣr).
Identify what is restricted and what it is restricted to. In the second statement, the relevant attendance is limited to Khalid; the first statement contains no corresponding exclusive claim. Confusing simple negation with restriction reverses the meaning.