It seems that the currentValue of renderLoop(unsigned int currentValue, RenderPressMode userClick) shows the index of the active item which was hidden by renderer.takeOverDisplay();, and the max value of currentValue is restricted by the menu item count.
IMO, since the display is already taken by custom ui, currentValue should not relate to the items of the current menu.