(menu_common_backend.c) Cut down on some code duplication