#516138 follow-up by yched: Instead of a full menu rebuild, set a variable indicating it's needed. Speeds up tests by a factor of at least two.