5th dnd – What happens to the Magnificent Mansions of Matryoshka Mordenkainen?

The following situation occurred towards the end of our last session (I am the SM): a player chose the Mordenkainen Magnificent Mansion so he could take a break and heal his comrades and rest a bit.

Then this player throws the mansion again (after a long rest) and places the gate inside the first mansion. Everyone went through before the first mansion disappeared, and was waiting to return to the main world again 24 hours later.

But technically, the mansion expels only creatures, not portals giving access to extradimensional plans. Should not we throw them to where the first manor, an extradimensional space, was?

I'm not going to do that to them now because it would be the end of the story and no one was expecting it, but still: Would my players be back in the extradimensional space where was the first mansion?