wlu: 206439 fix
diff --git a/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/UmaLibrary.java b/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/UmaLibrary.java
index 403ebd1..881ded8 100644
--- a/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/UmaLibrary.java
+++ b/org.eclipse.epf.import.xml/src/org/eclipse/epf/importing/xml/services/UmaLibrary.java
@@ -972,16 +972,28 @@
 					// delete the element from the library
 					//EcoreUtil.remove(e);				
 				} else if (e instanceof Activity) {
-					pkg = TngUtil.getMethodPackage(pkg);
-					while (pkg != null) {
-						pid = pkg.getGuid();
-						if (sourceElementIDs.contains(pid)) {
-							deletedElements.add(e);
-							handleActivityRemoval(e);
-							break;
+					
+					boolean toCheck = true;
+					MethodPackage pc = pkg;					
+					while(pc != null && ! (pc instanceof ProcessComponent)) {
+						pc = TngUtil.getParentMethodPackage(pc);
+					}
+					if (pc instanceof ProcessComponent) {
+						toCheck = sourceElementIDs.contains(pc.getGuid());
+					}
+					
+					if (toCheck) {
+						pkg = TngUtil.getMethodPackage(pkg);
+						while (pkg != null) {
+							pid = pkg.getGuid();
+							if (sourceElementIDs.contains(pid)) {
+								deletedElements.add(e);
+								handleActivityRemoval(e);
+								break;
+							}
+							pkg = TngUtil.getParentMethodPackage(pkg);
 						}
-						pkg = TngUtil.getParentMethodPackage(pkg);
-					} 
+					}
 				}
 			}
 		}