diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index 4266122d98d0fd46f527e6bb8bd2cc5c8c0ea1f7..ec587a82bc74e69af03559335101b7cd08a5324d 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2018 Dynare Team
+ * Copyright (C) 2003-2019 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -1203,6 +1203,7 @@ DynareSensitivityStatement::checkPass(ModFileStructure &mod_file_struct, Warning
   if (it != options_list.num_options.end()
       && it->second == "1")
     mod_file_struct.identification_present = true;
+  mod_file_struct.sensitivity_present = true;
 }
 
 void
diff --git a/src/ModFile.cc b/src/ModFile.cc
index 9c4578e6cf390db17a504498b9b3425b91f13ed6..25ef0a7815dc6c9e72db36b39147314b531aaa8d 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2018 Dynare Team
+ * Copyright (C) 2006-2019 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -142,6 +142,8 @@ ModFile::checkPass(bool nostrict, bool stochastic)
     || mod_file_struct.ramsey_policy_present
     || mod_file_struct.discretionary_policy_present
     || mod_file_struct.calib_smoother_present
+    || mod_file_struct.identification_present
+    || mod_file_struct.sensitivity_present
     || stochastic;
 
   // Allow empty model only when doing a standalone BVAR estimation
@@ -565,6 +567,8 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
       || mod_file_struct.ramsey_policy_present
       || mod_file_struct.discretionary_policy_present
       || mod_file_struct.calib_smoother_present
+      || mod_file_struct.identification_present
+      || mod_file_struct.sensitivity_present
       || stochastic )
     {
       // In stochastic models, create auxiliary vars for leads and lags greater than 2, on both endos and exos
diff --git a/src/Statement.hh b/src/Statement.hh
index fb672604491523dabea6755d1ae28e6ff2dc9ec8..d5c30c213e96e37b706ea67afc21545f0b998bb5 100644
--- a/src/Statement.hh
+++ b/src/Statement.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2017 Dynare Team
+ * Copyright (C) 2006-2019 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -68,6 +68,8 @@ public:
   bool svar_identification_present{false};
   //! Whether an identification statement is present or the identification option of dynare_sensitivity statement is equal to one
   bool identification_present{false};
+  //! Whether a sensitivity statement is present
+  bool sensitivity_present{false};
   //! Whether the option analytic_derivation is given to estimation
   bool estimation_analytic_derivation{false};
   //! Whether the option partial_information is given to stoch_simul/estimation/osr/ramsey_policy