for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
                                Entry           *e = NULL;
 
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &a->a_nvals[i], &save_ndn ))
+                                       continue;
+
                                rc = be_entry_get_rw( op, &a->a_nvals[ i ],
                                                NULL, NULL, 0, &e );
                                if ( rc == LDAP_SUCCESS ) {
                                send_ldap_result( op, rs );
                                goto done;
                        }
+                       /* ITS#6670 Ignore member pointing to this entry */
+                       if ( dn_match( &a->a_nvals[i], &save_ndn ))
+                               continue;
+
                        rc = be_entry_get_rw( op, &a->a_nvals[ i ],
                                        NULL, NULL, 0, &e );
                        op->o_bd->bd_info = (BackendInfo *)on;
                                                int             rc;
                                                Entry           *e;
                
+                                               /* ITS#6670 Ignore member pointing to this entry */
+                                               if ( dn_match( &ml->sml_nvalues[i], &save_ndn ))
+                                                       continue;
+
                                                if ( be_entry_get_rw( op, &ml->sml_nvalues[ i ],
                                                                NULL, NULL, 0, &e ) == LDAP_SUCCESS )
                                                {
                                        goto done2;
                                }
 
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &ml->sml_nvalues[i], &save_ndn ))
+                                       continue;
+
                                rc = be_entry_get_rw( op, &ml->sml_nvalues[ i ],
                                                NULL, NULL, 0, &e );
                                op->o_bd->bd_info = (BackendInfo *)on;
 
                        for ( i = 0; !BER_BVISNULL( &ma->a_nvals[ i ] ); i++ ) {
                
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &ma->a_nvals[i], &op->o_req_ndn ))
+                                       continue;
+
                                /* the modification is attempted
                                 * with the original identity */
                                memberof_value_modify( op,
                                a = attrs_find( a->a_next, mo->mo_ad_member ) )
                {
                        for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
+                               /* ITS#6670 Ignore member pointing to this entry */
+                               if ( dn_match( &a->a_nvals[i], &op->o_req_ndn ))
+                                       continue;
+
                                memberof_value_modify( op,
                                                &a->a_nvals[ i ],
                                                mo->mo_ad_memberof,