Fixed issue with exporting button's menus being shared between multiple buttons. Closes #1908.