#302638 by pwolanin: avoid running several no-op queries while the menu is being rebuilt; improves performance