use indexOf so we don't leak array methods in checkDuplicateIdentifiers