fix(menus): allow max depth of 20 to prevent losing menu items

fixes #5570 

this (minimal) fix makes the edge cases less frequent, but still has deadloop protection