Reveal will always show deleted links in the database, and ldbedit will always re-add them since they are in the search output. This is almost certainly not what you want.
Created attachment 12989 [details] patch for 4.6
Created attachment 12991 [details] patch for 4.5
Comment on attachment 12991 [details] patch for 4.5 Sadly we can't trivially backport to 4.5 as that means backporting all of the ldb changes made since 4.5 was forked. We also need to make an LDB release (metze generally does that) between now and the 4.6 release, and backport that.
We also need a2daa664ccd284b8894e67ed307a0bd761eb82db backported (similar patch for show-binary) before we can backport the release cut.
Fixed by bed19f3744a4193bed1ea99debfb6263feb78b6c in Samba 4.7. No backports were done but these versions are no longer supports. Sorry!