Index: trunk/xcache/xc_utils.c
===================================================================
--- trunk/xcache/xc_utils.c	(revision 1170)
+++ trunk/xcache/xc_utils.c	(revision 1171)
@@ -574,7 +574,4 @@
 	while (p) {
 		if (checker(p->pData)) {
-			if (setTargetPointer && source->pInternalPointer == p) {
-				target->pInternalPointer = NULL;
-			}
 			if (p->nKeyLength) {
 				zend_u_hash_quick_update(target, p->key.type, ZSTR(BUCKET_KEY_S(p)), p->nKeyLength, p->h, p->pData, size, &new_entry);
@@ -585,4 +582,7 @@
 				pCopyConstructor(new_entry);
 			}
+			if (setTargetPointer && source->pInternalPointer == p) {
+				target->pInternalPointer = new_entry;
+			}
 		}
 		p = p->pListNext;
