     /// The row is implemented on top of StatementCopyRowImpl, which *copies*
     /// the values from the SQLite statement so that further iteration of the
     /// statement does not modify the row.
-    init(copiedFromStatementRef statementRef: Unmanaged<SelectStatement>, sqliteStatement: SQLiteStatement) {
+    init(copiedFromSQLiteStatement sqliteStatement: SQLiteStatement, statementRef: Unmanaged<SelectStatement>) {
         self.statementRef = nil
         self.sqliteStatement = nil
-        self.impl = StatementCopyRowImpl(statementRef: statementRef, sqliteStatement: sqliteStatement)
+        self.impl = StatementCopyRowImpl(sqliteStatement: sqliteStatement, columnNames: statementRef.takeUnretainedValue().columnNames)
+    }
+    
+    /// Builds a row from the *current state* of the SQLite statement.
+    ///
+    /// The row is implemented on top of StatementCopyRowImpl, which *copies*
+    /// the values from the SQLite statement so that further iteration of the
+    /// statement does not modify the row.
+    init(copiedFromSQLiteStatement sqliteStatement: SQLiteStatement, columnNames: [String]) {
+        self.statementRef = nil
+        self.sqliteStatement = nil
+        self.impl = StatementCopyRowImpl(sqliteStatement: sqliteStatement, columnNames: columnNames)
     }
 }
 

        let statementRef = Unmanaged.passRetained(statement) // released in deinit
        self.statementRef = statementRef
        self.sqliteStatement = statement.sqliteStatement
        self.impl = StatementRowImpl(statementRef: statementRef, sqliteStatement: statement.sqliteStatement)
    }
    
    /// Builds a row from the *current state* of the SQLite statement.

    @warn_unused_result
    public static func fetchAll(statement: SelectStatement, arguments: StatementArguments? = nil) -> [Row] {
        let sqliteStatement = statement.sqliteStatement
        let columnNames = statement.columnNames
        let sequence = statement.fetchSequence(arguments: arguments) {
            Row(copiedFromSQLiteStatement: sqliteStatement, columnNames: columnNames)
        }
        return Array(sequence)
    }
