thread_index: don't fail on empty list