https://bugs.openldap.org/show_bug.cgi?id=9291
--- Comment #4 from Howard Chu hyc@openldap.org --- If there are any references to pages beyond the end of the file, that implies that an fsync didn't complete. Are you running with NOSYNC or NOMETASYNC?
On Windows one of the common symptoms we see after a system crash is that trailing pages of the DB file are all-zero. Again, this indicates an fsync that didn't complete (or an NTFS bug).
I think your proposed change is too specific, since it could be any page, not just the meta pages, that references beyond the end of the file.