Better:

    input.ancestors().indexOf(this.list) == -1