Yes, she did buy all her flights together, on one itinerary. Sorry for the other lack of information. She holds Ukrainian passport. Since my original post, I found that she will likely be arriving and departing from different terminals at Madrid, but that they have an airside shuttle service for "non-schengen" passengers. I would assume this means she'll be okay without schengen coming home through Madrid, but I have not been able to confirm this yet.