#1186208 by chx, salvis, mrfelton: Improve the stability and throw an exception for MENU_DEFAULT_LOCAL_TASKs.