use an NFA to sort out listy things

This also fixes RT #117091, so :ignorecase is respected in assertions too.