And if it's not related to the RES-system, still might be an issue of missing APIS-data or even the beloved Quad-S.
It will be sorted out at the airport, no worries!
I don't think it is secondary screening withhold because the first boarding pass was available. None would be allowed if the flag was present.
Passport check or related for Spain/EU entry seems most likely.
Rasheed