diff --git a/org.eclipse.rmf.reqif10.serialization/src/org/eclipse/rmf/reqif10/serialization/ReqIF10ResourceImpl.java b/org.eclipse.rmf.reqif10.serialization/src/org/eclipse/rmf/reqif10/serialization/ReqIF10ResourceImpl.java
index b353961..a089ef9 100644
--- a/org.eclipse.rmf.reqif10.serialization/src/org/eclipse/rmf/reqif10/serialization/ReqIF10ResourceImpl.java
+++ b/org.eclipse.rmf.reqif10.serialization/src/org/eclipse/rmf/reqif10/serialization/ReqIF10ResourceImpl.java
@@ -26,10 +26,6 @@
 import org.eclipse.rmf.serialization.XMLPersistenceMappingResourceImpl;
 
 public class ReqIF10ResourceImpl extends XMLPersistenceMappingResourceImpl {
-	/**
-	 * Indicate if we must not replace the id or not
-	 */
-	private boolean keepID = false;
 
 	public ReqIF10ResourceImpl() {
 		super();
@@ -58,25 +54,7 @@
 		// ========= default load options ===================
 		Map<Object, Object> loadOptions = getDefaultLoadOptions();
 		loadOptions.put(XMLResource.OPTION_XML_MAP, optionsMap);
-	}
-
-	/**
-	 * Set the new value of keep id
-	 * 
-	 * @param keepID
-	 *            : The new value of keep id
-	 */
-	public void setKeepID(boolean keepID) {
-		this.keepID = keepID;
-	}
-
-	/**
-	 * Return whether the flag of keeping the id is on or off
-	 * 
-	 * @return The value of the flag of keeping the id
-	 */
-	public boolean isKeepID() {
-		return keepID;
+		
 	}
 
 	/**
@@ -113,18 +91,20 @@
 	 *      java.lang.String)
 	 */
 	@Override
-	public void setID(final EObject eObject, final String id) {
+	public void setID(final EObject eObject, String id) {
 		final EAttribute idAttribute = eObject.eClass().getEIDAttribute();
+		if (idAttribute != null) {
+			Object currentId = eObject.eGet(idAttribute);
+			if (currentId instanceof String) id = (String)currentId;
+		}
 		String idToSet = id;
 		if ((idAttribute != null) && (idToSet != null)) {
-			if (isKeepID()) {
 				Object existingID = eObject.eGet(idAttribute);
 				if ((existingID != null)
 						&& (false == existingID.toString().trim().isEmpty())) {
 					idToSet = existingID.toString();
 				}
-			}
-			// We must not keep the existing id, so we overrite it
+			// We must not keep the existing id, so we override it
 			if (idToSet.equals(id)) {
 				eObject.eSet(idAttribute, id);
 			}
diff --git a/org.eclipse.rmf.tests.reqif10.serialization/src/org/eclipse/rmf/tests/reqif10/serialization/uc003/tc18xx/TC18xxHISExchangeProcessTests.java b/org.eclipse.rmf.tests.reqif10.serialization/src/org/eclipse/rmf/tests/reqif10/serialization/uc003/tc18xx/TC18xxHISExchangeProcessTests.java
index 40150fe..ecc6a0a 100644
--- a/org.eclipse.rmf.tests.reqif10.serialization/src/org/eclipse/rmf/tests/reqif10/serialization/uc003/tc18xx/TC18xxHISExchangeProcessTests.java
+++ b/org.eclipse.rmf.tests.reqif10.serialization/src/org/eclipse/rmf/tests/reqif10/serialization/uc003/tc18xx/TC18xxHISExchangeProcessTests.java
@@ -34,7 +34,6 @@
 import org.eclipse.rmf.reqif10.SpecObject;
 import org.eclipse.rmf.reqif10.Specification;
 import org.eclipse.rmf.reqif10.XhtmlContent;
-import org.eclipse.rmf.reqif10.serialization.ReqIF10ResourceImpl;
 import org.eclipse.rmf.reqif10.xhtml.XhtmlPType;
 import org.eclipse.rmf.tests.reqif10.serialization.util.AbstractTestCase;
 import org.eclipse.rmf.tests.reqif10.serialization.util.CommonSystemAttributes;
@@ -62,12 +61,15 @@
 
 		tc1801ReqIF = new TC1801HISExchangeProcessModelBuilder(loadReqIFFile(TC1800_FILENAME)).getReqIF();
 		doSaveReqIFFile(tc1801ReqIF, TC1801_FILENAME);
+		tc1801ReqIF = loadReqIFFile(TC1801_FILENAME); // Ensure all references to the old filename are gone
 
 		tc1802ReqIF = new TC1802HISExchangeProcessModelBuilder(loadReqIFFile(TC1801_FILENAME)).getReqIF();
 		doSaveReqIFFile(tc1802ReqIF, TC1802_FILENAME);
+		tc1802ReqIF = loadReqIFFile(TC1802_FILENAME); // Ensure all references to the old filename are gone
 
 		tc1803ReqIF = new TC1803HISExchangeProcessModelBuilder(loadReqIFFile(TC1802_FILENAME)).getReqIF();
 		doSaveReqIFFile(tc1803ReqIF, TC1803_FILENAME);
+		tc1803ReqIF = loadReqIFFile(TC1803_FILENAME); // Ensure all references to the old filename are gone
 	}
 
 	@Test
@@ -273,13 +275,8 @@
 	protected static void doSaveReqIFFile(EObject reqif, String fileName) throws IOException {
 		URI emfURI = createEMFURI(fileName);
 		Resource resource = getXMLPersistenceMappingResourceSet().createResource(emfURI);
-		if (resource instanceof ReqIF10ResourceImpl) {
-			((ReqIF10ResourceImpl) resource).setKeepID(true);
-		}
 		resource.getContents().add(reqif);
 		resource.save(getSaveOptions());
-		if (resource instanceof ReqIF10ResourceImpl) {
-			((ReqIF10ResourceImpl) resource).setKeepID(false);
-		}
 	}
+
 }
