According to your comments on the ticket we need to make sure we're using the largest target_seq recorded. While we should be roughly guaranteed to have them in order, a lists:sort/2 of UsableHistory might be a good idea.