         return AnyIterator {
             guard let pair = a.next() else { return nil }
             let (groupKey, results) = pair
-            guard var bindings = groupBindings[groupKey] else { fatalError("Unexpected missing aggregation group template") }
+            guard var bindings = groupBindings[groupKey] else {
+                Logger.shared.error("Unexpected missing aggregation group template")
+                fatalError("Unexpected missing aggregation group template")
+            }
             for (agg, name) in aggs {
                 switch agg {
                 case .countAll:

        case let .path(s, path, o):
            return try evaluatePath(subject: s, object: o, graph: activeGraph, path: path)
        case let .namedGraph(child, graph):
            guard case .variable(let gv, let bind) = graph else { fatalError("Unexpected node found where variable required") }
            var iters = try store.graphs().filter { $0 != defaultGraph }.map { ($0, try evaluate(algebra: child, activeGraph: $0)) }
            return AnyIterator {
                repeat {

            for row in rows {
                var bindings = [String:Term]()
                for (node, term) in zip(names, row) {
                    guard case .variable(let name, _) = node else {
                        Logger.shared.error("Unexpected variable generated during table evaluation")
                        throw QueryError.evaluationError("Unexpected variable generated during table evaluation")
                    }
                    if let term = term {
                        bindings[name] = term
                    }
