diff --git a/ComputingTasks.cc b/ComputingTasks.cc
index 9d1a93b7026f6b1007e6abdf03e04e29c463bdf0..4955fa1c5a24d896ed7437afebb13468ce9ce589 100644
--- a/ComputingTasks.cc
+++ b/ComputingTasks.cc
@@ -3391,6 +3391,23 @@ OptionsStatement::OptionsStatement(const string &name_arg,
 {
 }
 
+Statement *
+OptionsStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
+{
+  try
+    {
+      SymbolTable *new_symbol_table =  dynamic_datatree.getSymbolTable();
+      new_symbol_table->getID(name);
+    }
+  catch (...)
+    {
+      cerr << "ERROR: A variable in the options statement was not found in the symbol table" << endl
+           << "       This likely means that you have declared a varexo that is not used in the model" << endl;
+      exit(EXIT_FAILURE);
+    }
+  return new OptionsStatement(name, subsample_name, options_list);
+}
+
 void
 OptionsStatement::writeOutput(ostream &output, const string &basename) const
 {
@@ -3419,6 +3436,23 @@ StdOptionsStatement::StdOptionsStatement(const string &name_arg,
 {
 }
 
+Statement *
+StdOptionsStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
+{
+  SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable();
+  try
+    {
+      new_symbol_table->getID(name);
+    }
+  catch (...)
+    {
+      cerr << "ERROR: A variable in the std_options statement was not found in the symbol table" << endl
+           << "       This likely means that you have declared a varexo that is not used in the model" << endl;
+      exit(EXIT_FAILURE);
+    }
+  return new StdOptionsStatement(name, subsample_name, options_list, *new_symbol_table);
+}
+
 void
 StdOptionsStatement::writeOutput(ostream &output, const string &basename) const
 {
@@ -3474,6 +3508,24 @@ CorrOptionsStatement::checkPass(ModFileStructure &mod_file_struct, WarningConsol
     }
 }
 
+Statement *
+CorrOptionsStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
+{
+  SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable();
+  try
+    {
+      new_symbol_table->getID(name);
+      new_symbol_table->getID(name1);
+    }
+  catch (...)
+    {
+      cerr << "ERROR: A variable in the corr_options statement was not found in the symbol table" << endl
+           << "       This likely means that you have declared a varexo that is not used in the model" << endl;
+      exit(EXIT_FAILURE);
+    }
+  return new CorrOptionsStatement(name, name1, subsample_name, options_list, *new_symbol_table);
+}
+
 void
 CorrOptionsStatement::writeOutput(ostream &output, const string &basename) const
 {
@@ -3521,6 +3573,37 @@ OptionsEqualStatement::checkPass(ModFileStructure &mod_file_struct, WarningConso
     }
 }
 
+Statement *
+OptionsEqualStatement::cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table)
+{
+  SymbolTable *new_symbol_table = dynamic_datatree.getSymbolTable();
+  try
+    {
+      new_symbol_table->getID(to_name1);
+      if (!to_name2.empty())
+        new_symbol_table->getID(to_name2);
+
+      new_symbol_table->getID(from_name1);
+      if (!from_name2.empty())
+        new_symbol_table->getID(from_name2);
+    }
+  catch (...)
+    {
+      cerr << "ERROR: A variable in the options equal statement was not found in the symbol table" << endl
+           << "       This likely means that you have declared a varexo that is not used in the model" << endl;
+      exit(EXIT_FAILURE);
+    }
+  return new OptionsEqualStatement(to_declaration_type,
+                                   to_name1,
+                                   to_name2,
+                                   to_subsample_name,
+                                   from_declaration_type,
+                                   from_name1,
+                                   from_name2,
+                                   from_subsample_name,
+                                   *new_symbol_table);
+}
+
 void
 OptionsEqualStatement::get_base_name(const SymbolType symb_type, string &lhs_field) const
 {
diff --git a/ComputingTasks.hh b/ComputingTasks.hh
index b6625e818045ac8df151f35ad423d0b9217a886f..3d3f07f50cca78e9570e5c9b18eca6efb7805bcd 100644
--- a/ComputingTasks.hh
+++ b/ComputingTasks.hh
@@ -850,6 +850,7 @@ public:
   OptionsStatement(const string &name_arg, const string &subsample_name_arg, const OptionsList &options_list_arg);
   virtual void writeOutput(ostream &output, const string &basename) const;
   virtual void writeCOutput(ostream &output, const string &basename);
+  virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
 };
 
 class StdOptionsStatement : public BasicOptionsStatement
@@ -863,6 +864,7 @@ public:
                       const SymbolTable &symbol_table_arg);
   virtual void writeOutput(ostream &output, const string &basename) const;
   virtual void writeCOutput(ostream &output, const string &basename);
+  virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
 };
 
 class CorrOptionsStatement : public BasicOptionsStatement
@@ -878,6 +880,7 @@ public:
   virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
   virtual void writeOutput(ostream &output, const string &basename) const;
   virtual void writeCOutput(ostream &output, const string &basename);
+  virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
 };
 
 class OptionsEqualStatement : public Statement
@@ -905,6 +908,7 @@ public:
   void get_base_name(const SymbolType symb_type, string &lhs_field) const;
   virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
   virtual void writeOutput(ostream &output, const string &basename) const;
+  virtual Statement *cloneAndReindexSymbIds(DataTree &dynamic_datatree, SymbolTable &orig_symbol_table);
 };
 
 class ModelDiagnosticsStatement : public Statement