ScheduleOccurrence: Fix the code to filter out overwritten instances