This patch looks good to me. It's a longstanding bug, and the solution in this patch is (duh) not to ask for the "arguments" of a submenu. Only regular menu items have a target, selector, and arguments....