Fix bug from another branch

This was fixed in my profile branch but not in the
task branch.  Need to use indexOf for arrays instead
of has.

Porting this change over.