The 'Checking luggage thru to Almeria' may not be an option, even without a change of airline. Not all airports in Spain are International Ports of Entry even though flights from other EU Countries arrive/depart there. If Almeria is not an International Airport (i.e., with Immigration & Customs) she may have to clear both on arrival in Madrid when she enters the EU.

Sometimes this is not strictly enforced: Once I arrived in Madrid on SpanAir from Dulles, with a connection on SpanAir to Santiago de Compostela. SpanAir checked my baggage thru to Santiago. On arrival at Barajas I was routed to a closed passageway to the gate for my Santiago flight: there was a Passport Control (Immigration) Agent but no Customs. I expected to go thru Customs at Santiago but there was no Immigration or Customs there, either.