This is correct. Lan Wangji appreciates that he is being distracted from Wei Ying, even by discomfort.
The last time he was in this cave, he lay bleeding out into these icy, healing waters. Even though his wounds had never stopped hurting, the pain then had been truly unimaginable. Worse still, the pain of grief and his own failure. His love was gone.
The time before that, Lan Wangji had stood beside his uncle and listened to the awful, vivid sounds of butchery as members of his clan were slaughtered. Killed because of him, to draw him out. Their choked screams, and Wen Xu bellowing his name...
He makes it all the way to the qugin before he stops being distracted.