What triggers the stated exception for «أَيّ / أَيّة»?

Relative Nouns — Ṣilah, ʿĀʾid, Forms and Syntax