                     fatalError("Received more results than expected!")
                 }
             case .error(_):
+                defer { currentFetchRequest = nil }
                 os_log("Received error on resource fetch.  Cancelling request and notifying completion.", type: .debug)
-                currentFetchRequest = nil
                 guard !progress.isCancelled else {
                     break
                 }

            case .success, .noData:
                results.append(result)
                if results.count == expectedResultCount {
                    os_log("All resources received.  Notifying completion.", type: .debug)
                    currentFetchRequest = nil
                    if results.contains(.success) {
                        completionHandler(.success)
                    } else {

            return currentFetchRequest
        }
        
        let weightedUpdateOperations: [(weight: Int64, UpdateFunction)] = [
            (4, updateAssignments),
            (1, updateLevelProgression),
            (2, updateReviewStatistics),
            (2, updateStudyMaterials),
            (4, updateSubjects),
            (1, updateUser)
        ]
        
        let expectedResultCount = weightedUpdateOperations.count
        let expectedTotalUnitCount = weightedUpdateOperations.reduce(1, { $0 + $1.weight })
        
        os_log("Scheduling resource fetch request", type: .debug)
        
