[Issue 9583] possible memory corruption in avl_buildlist