What exactly do you mean by 'happen to be on a master page'? I've tried selecting the master page in the Pages panel, but with two alternate layouts, it still only exports one of them.
Is it possible to export both at the same time and in addition, what is the use of the data-layout attribute that's added?