Only recalculate the menu size if its items have changed