In the method 'get_content()' of '/blocks/site_main_menu/block_site_main_menu.php' there is the line:
$menu = $controlmenu->get_action_menu($OUTPUT);
But '$menu' is not actually used!
This has happened between M3.11 and M4.0, so has something now been broken?