It was broken in two ways: - bpy_bmlayercollection_iter passed PY_SSIZE_T_MIN, while PY_SSIZE_T_MAX was needed. - bpy_bmlayercollection_subscript_slice() contained an off-by-one error. Pull Request: https://projects.blender.org/blender/blender/pulls/107165