Yucca spines always cause swelling and pain where ever they happen to stab me...
Dig the things out... and they grow right back!
If I was stabbed in the head by yuccas, i would expect the symptoms you describe.
Personally, I'd probably tough it out.... but... I've gotten into trouble that way...