The following event will hang:
PRODID:-//Apple Inc.//iOS 5.0//EN
expand_year_days treats the BYDAY part of the RRULE as a the 4th Thursday of the year rather than the 4th Thursday of November, which the creator probably expected. I'm fairly sure the current implementation is correct and this recurrence is just invalid, the only problem is this RRULE will cause icalrecur_iterator_new to hang. I changed the infinite for loop to bail after the year 20000 to avoid hanging.