Fix bug in logic for dealing with out-of-sequence annotation entries.