Overview of Issue
The menu depth setting in taxonomy_menu does not always reflect the actual menu depth in the menu items. It is possible to engineer two situations in which the depth is deeper than the setting in taxonomy_menu.
The menu depth setting should always be an upper limit for the menu items.
Steps to Reproduce (scenario i)
1) Create a taxonomy with a few items making sure at least one item has 3 levels.
2) Create the menu_taxonomy and set the depth to 3
3) Note that the menu has 3 levels (admin/structure/menu/manage/my-menu)
4) Now change the menu_taxonomy depth to 2
In this scenario the final menu should only have a depth of 2.
Steps to Reproduce (scenario ii)
1) Create a taxonomy with a few item making sure at least one item has 2 levels.
2) Create the menu_taxonomy and set the depth to 2
3) The menu will have 2 levels (admin/structure/menu/manage/my-menu) as follows
-- Term A
-- Term B
--- Term B_1
--- Term B_2
-- Term C
4) In the taxonomy select a term which has at least 2 levels and move this term to the child of term
5) The menu has 3 levels (admin/structure/menu/manage/my-menu) as follows
-- Term A
--- Term B
---- Term B_1
---- Term B_2
-- Term C
In this scenario the final menu should only have a depth of 2. Furthermore it's not possible to remove the 3rd level.