opm.o_managedsait = SLAP_CONTROL_NONCRITICAL;
        opm.o_no_schema_check = 1;
        opm.o_bd->be_modify( &opm, &rsm );
+
+       /* Should only happen with SYNC_USE_SUBENTRY */
+       if ( rsm.sr_err == LDAP_NO_SUCH_OBJECT ) {
+               const char      *text;
+               char txtbuf[SLAP_TEXT_BUFLEN];
+               size_t textlen = sizeof txtbuf;
+               Entry *e = slap_create_context_csn_entry( opm.o_bd, NULL );
+               slap_mods2entry( &mod, &e, 0, 1, &text, txtbuf, textlen);
+               opm.ora_e = e;
+               opm.o_bd->be_add( &opm, &rsm );
+               if ( e == opm.ora_e )
+                       be_entry_release_w( &opm, opm.ora_e );
+       }
+
        if ( mod.sml_next != NULL ) {
                slap_mods_free( mod.sml_next, 1 );
        }
 
        op->orm_modlist = &mod;
        op->orm_no_opattrs = 1;
        rc = op->o_bd->be_modify( op, &rs_modify );
+
+       /* Should only happen when SYNC_USE_SUBENTRY */
+       if ( rs_modify.sr_err == LDAP_NO_SUCH_OBJECT ) {
+               const char      *text;
+               char txtbuf[SLAP_TEXT_BUFLEN];
+               size_t textlen = sizeof txtbuf;
+               Entry *e = slap_create_context_csn_entry( op->o_bd, NULL );
+               rc = slap_mods2entry( &mod, &e, 0, 1, &text, txtbuf, textlen);
+               op->ora_e = e;
+               rc = op->o_bd->be_add( op, &rs_modify );
+               if ( e == op->ora_e )
+                       be_entry_release_w( op, op->ora_e );
+       }
+
        op->orm_no_opattrs = 0;
        op->o_dont_replicate = 0;