diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 4c21a481a139daa6e5d8560bd5627effbace3bda..4e98111f68b51c815a8db36820cd42846090055c 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -3201,7 +3201,7 @@ UnaryOpNode::substituteUnaryOpNodes(DataTree &static_datatree, diff_table_t &nod
   if (it == nodes.end())
     return buildSimilarUnaryOpNode(argsubst, datatree);
 
-  int base_aux_lag;
+  int base_aux_lag = 0;
   VariableNode *aux_var = nullptr;
   for (auto rit = it->second.rbegin(); rit != it->second.rend(); rit++)
     if (rit == it->second.rbegin())