Invalidate the menu so it can be recreated on resume

Fix #339.