slapd has a built in check against the lmdb version is is loading compared to the lmdb version it was built against. In case of a mismatch slapd refuses to start.
Thus openldap needs a build time dependency causing an automatic rebuild whenever lmdb is up-/downgraded.
I was stuck more than once by an "emerge -uND world" causing a lmdb upgrade but not an openldap rebuild.
Unfortunately, portage does not have an automatic rebuild function on a dependency version change. It is able to do so on subslot changes, but dev-db/lmdb does not use subslots.
Passing to maintainers for further reference.
eras, mind adding subslots to lmdb?
Subslots added to dev-db/lmdb