https://bugs.openldap.org/show_bug.cgi?id=10236
--- Comment #5 from aalekseyev@janestreet.com --- Um, I'm afraid I found a bug in the original patch: it leaks pages by dropping free list chunks too early.
To fix the bug you need to avoid advancing `last` unless you've decided you're doing the merge (so both `if (oldest <= last_candidate)` exits from the inner loop are problematic).
Speaking of which, are there any tests of lmdb out there that should have caught this?