Not sure how to iterate over this faster (result_index has the correct ordering, indices it's a dict, doesn't)...