         guard let scopedRow = scopesTree[scope] else {
             // Programmer error
             fatalError("missing scope `\(scope)` (row: \(self))")
+        }
+        guard scopedRow.containsNonNullValue else {
+            // Programmer error
+            fatalError("scope `\(scope)` only contains null values (row: \(self))")
         }
         return Record(row: scopedRow)
     }

    ///     print(country.name)
    ///     // Prints "United States"
    ///
    /// A fatal error is raised if the scope is not available.
    ///
    /// See https://github.com/groue/GRDB.swift/blob/master/README.md#joined-queries-support
    /// for more information.

        ///
        /// Prefetched rows stored in nested "to-one" associations are
        /// available, too.
        ///
        /// Nil is returned if the key is not available.
        public subscript(_ key: String) -> [Row]? {
            var fifo = Array(prefetches)
            while !fifo.isEmpty {
