Ref T10747. I may come back and try to clean this up, but at least make all the tests pass.
This stuff is really messy because if you have a YEARLY rule like "the 3rd of every month", and BYSETPOS on it, and the first instance is in June, too bad: we have to build every event for the whole year to apply BYSETPOS.