I am afraid that's what the function does. From Drupal docs:
This function will clear and populate the {menu_router} table, add entries to {menu_links} for new router items, and then remove stale items from {menu_links}. If called from update.php or install.php, it will also schedule a call to itself on the first real page load from menu_execute_active_handler(), because the maintenance page environment is different and leaves stale data in the menu tables.
I guess you could try to reimplement the function into your own custom one and modify its source according to your needs. It looks like a lot of work though. You'd probably have to reimplement more functions.
Source: https://api.drupal.org/api/drupal/includes!menu.inc/function/menu_rebuild/7