[335559] Editing a html file with CommentElementHandlerForSSI caused StackOverFlow error
diff --git a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java
index feeb87c..367050e 100644
--- a/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java
+++ b/bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2001, 2009 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -454,6 +454,7 @@
 		setActive(parser);
 		this.document.removeChildNodes();
 		try {
+			this.refresh = false;
 			parser.replaceStructuredDocumentRegions(getStructuredDocument().getRegionList(), null);
 		}
 		catch (Exception ex) {
@@ -463,7 +464,6 @@
 			setActive(null);
 			if (!isChanging)
 				notifier.endChanging();
-			this.refresh = false;
 		}
 	}