I stand corrected, and was actually returning to edit my original post when I saw this. I was always under the impression that the form a or an takes is dependent on that which it determines. Apologies.
Also, it's not even the noun phrase according to the sources I'm looking at (namely Merriam-Webster) which state that it is always dependent on the word directly following the article, not even the entire phrase.
A easy mistake to make