Sure this bug is introduced by the 4d02c741 (Use a single write txn).
Could be fixed by: cherry-pick ead57604 (ITS#7961 Re-fix txn init) from git://git.uio.no/u/hbf/openldap.git or revert: d72b2f5d (ITS#7961 fix txn init), 62e4eeb7 (ITS#7943 reinit txn flags), 891e6627 (Plug leak in 4d02c741...) and 4d02c741 (Use a single write txn).
Leonid.