I have the same usecase and the same issue.
When I put the content of the first page to hidden (wrapped in a subform) and make the content of the 2nd page visible the first master page remains visible even though the subform is hidden.
Have you found a solution to this issue.
My form is dynamic.
There is a restriction in XFA that the 1st Master page definition must be used. Any subsequent ones can be unised ...but the 1st one must be used!