fixes #6516 coalesce "View invoice" options into submenu if there are multiple; also make sure lambda uses bound argument