diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index 8f65bc0a5ee6b3a0f8cf106ca56288a449c5855d..9d87b44658f2e55a4a09a475866cae96f089a384 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -2202,9 +2202,9 @@ PlannerObjectiveStatement::getPlannerObjective() const
 }
 
 void
-PlannerObjectiveStatement::computingPass()
+PlannerObjectiveStatement::computingPass(const ModFileStructure &mod_file_struct)
 {
-  model_tree.computingPass(3, 0, {}, false, false, false);
+  model_tree.computingPass(max(3, mod_file_struct.order_option), 0, {}, false, false, false);
   computing_pass_called = true;
 }
 
diff --git a/src/ComputingTasks.hh b/src/ComputingTasks.hh
index d86cb4bcd1822aae632e07a71929d6dd98cf6f8a..96ae1627b8c9428c98e7a8b19d81523d2015c3df 100644
--- a/src/ComputingTasks.hh
+++ b/src/ComputingTasks.hh
@@ -517,7 +517,7 @@ public:
     (no exogenous, no lead/lag) */
   void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
   /*! \todo allow for the possibility of disabling temporary terms */
-  void computingPass() override;
+  void computingPass(const ModFileStructure &mod_file_struct) override;
   void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
   void writeJsonOutput(ostream &output) const override;
   //! Return a reference the Planner Objective model tree
diff --git a/src/ModFile.cc b/src/ModFile.cc
index 0a13ace9b26f1fda58c7a79d01a43ae808d08d77..55f59f661da8cb7705bfdfdc1b1845c5cc7f7fc1 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -840,7 +840,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
     }
 
   for (auto &statement : statements)
-    statement->computingPass();
+    statement->computingPass(mod_file_struct);
 
   // Compute epilogue derivatives (but silence standard output)
   streambuf *oldcout = cout.rdbuf();
diff --git a/src/Statement.cc b/src/Statement.cc
index 85c6d23553f1425384b925efd736ff2edcfc5ed1..c18b404b021f1f0d5515bf2fc0c37f39cda1572d 100644
--- a/src/Statement.cc
+++ b/src/Statement.cc
@@ -30,7 +30,7 @@ Statement::checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &wa
 }
 
 void
-Statement::computingPass()
+Statement::computingPass(const ModFileStructure &mod_file_struct)
 {
 }
 
diff --git a/src/Statement.hh b/src/Statement.hh
index dc4cf1904d560ebfe4fb07ba1cf99a9193460e36..8988441d31767a95f52567538434a97eb2bd2e4b 100644
--- a/src/Statement.hh
+++ b/src/Statement.hh
@@ -164,7 +164,7 @@ public:
     method. Otherwise the default implementation (i.e. a no-op) will apply and
     some checks won't be run. */
   virtual void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings);
-  virtual void computingPass();
+  virtual void computingPass(const ModFileStructure &mod_file_struct);
   //! Write Matlab output code
   /*!
     \param output is the output stream of the main matlab file