                         opts.options.push(x)
 
         result = undefined
-        db_query = @table(SCHEMA[opts.table].virtual ? opts.table)
+        table_name = SCHEMA[opts.table].virtual ? opts.table
+        db_query = @table(table_name)
         opts.this = @
 
         # The killfeed below is only used when changes is true in case of tricky queries that depend

            query = query.union(db.table(opts.tables[i]))
        query.changes(includeInitial:false).run (err, feed) =>
            feed.each(opts.cb)

    # Wait until the query results in at least one result obj, and
    # calls cb(undefined, obj).

                ## cb(); return # to disable
                if opts.changes
                    # see discussion at https://github.com/rethinkdb/rethinkdb/issues/4754#issuecomment-143477039
                    @wait_until_ready_for_writes
                        table   : table_name
                        cb      : cb
                else
                    cb()
            (cb) =>
