This fix only avoids the stack overflow problem, but the root cause of the memory corruption that caused the overflow is still not addressed. The root cause of the corruption is hard to determine. With this fix it is still possible to still run into a corrupted item, but instead of running into a stack overflow, a panic will occur and a stack will be dumped. That should provide more details and will hopefully lead to determining the root cause.
Also, we have requested information on the document details, like key types, length and will try a reproduction with synthetic data. Another exercise planned is to look through the potential areas where unsafe memory access is performed.