NSArray has 5 objects in iOS6 but 4 objects in iOS5?
[taskValues count] is 5 under iOS6.0 and 4 under iOS5.1. Help :)
NSArray *taskValues = [NSArray arrayWithObjects:task.name, task.description, task.duration, task.notification, task.notificationThereafter, nil];
Solved. It's embarrassing. Of course you are correct. The persisted state on the iOS5 emulator was different from the state on the iOS6 emulator, the underlying data model changed long ago and the iOS5 emulator was never reset. I'm taking an iOS6 app and backing it to work for iOS5.1. You helped me see the light!
My most probable guess is that task.notificationThereafter is nil when you're running your app under iOS 5.1. Of course, I don't know your application enough to know the cause of that.