Fix crash when trying to access managedObjectContext of wrong object