#202955 by chx: menu_rebuild() needs to be called after maintenance mode, because stale data might end up in menu tables in maintenance mode