diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc
index 359ded42db46b5d8beb1848b7997cd55b25c3683..a2a6f9083681cd757f3eb5e5dcc65f8b08990fc2 100644
--- a/preprocessor/ExprNode.cc
+++ b/preprocessor/ExprNode.cc
@@ -252,6 +252,8 @@ VariableNode::collectTemporary_terms(const temporary_terms_type &temporary_terms
   temporary_terms_type::const_iterator it = temporary_terms.find(const_cast<VariableNode *>(this));
   if (it != temporary_terms.end())
     ModelBlock->Block_List[Curr_Block].Temporary_InUse->insert(idx);
+  if(type== eModelLocalVariable)
+    datatree.local_variables_table[symb_id]->collectTemporary_terms(temporary_terms, ModelBlock, Curr_Block);
 }
 
 void