I have a hunch regarding this bug. I do not have the programming expertise neccessary to confirm it, but perhaps it could spur someone in the right direction. The docs indicate a sqrt is involved in the selection of the optimal arrangement. This would seemingly result in one menu being 10 items too long being preferred (incorrectly, imho) over 10 submenus being 1 items too short, sqrt(10) being less than 10*sqrt(1).