When one expands a Schur function in terms of the irreducible characters of the
symplectic (or orthogonal) group, the coefficient of the trivial character is 0 unless the
indexing partition has an appropriate form. A number of q-analogues of this fact were
conjectured in math.QA/0112035; the present paper proves most of those conjectures, as well
as some new identities suggested by the proof technique. The proof involves showing that a
nonsymmetric version of the relevant integral is annihilated by a suitable ideal of the
affine Hecke algebra, and that any such annihilated functional satisfies the desired
vanishing property. This does not, however, give rise to vanishing identities for the
standard nonsymmetric Macdonald and Koornwinder polynomials; we discuss the required
modification to these polynomials to support such results.