Do the lookup right for the sort.