Index: ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 19081)
+++ ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 19082)
@@ -722,8 +722,15 @@
 			for(j=0;j<numnodes;j++){
 				/*Increase of the domain is on the downstream node in term of sediment head*/
 				if(sedhead[j] == sedheadmin){
-					if(old_active[j]==0) eplzigzag_counter[basalelement->nodes[j]->Lid()] ++;
-					vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL);
+					if(old_active[j]==0) {
+						eplzigzag_counter[basalelement->nodes[j]->Lid()] ++;
+						if(eplzigzag_counter[basalelement->nodes[i]->Lid()]<eplflip_lock |eplflip_lock==0){
+							vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL);
+						}
+						else{
+							vec_mask->SetValue(basalelement->nodes[j]->Sid(),0.,INS_VAL);
+						}
+					}
 				}
 			}
 		}
