Yes, that's the "trick" they use. Mind if Spain called Messi to the national team before Argentina.
"Often referred to as an Argentine-Spanish player, this crossover was brought into sharp focus when in 2004, Lionel was offered the chance to play for the Spanish national U-20 team. He declined the offer given his Argentine heritage, and was given the opportunity to play for Argentina's U-20 team in a friendly match against Paraguay in June 2004."