Check for thread IDs using the thread_rank_map if we can't identify the rank by token.