Indesign 5 How can I search and replace in order of appearance?

Here is my script. I am trying to replace instances of a text pattern (Lot ^9^9^9^9^9) with an auto incremented number Lot 1, Lot 2, Lot 3, etc… I believe this script produces unexpected results becuase the search result is ordered by document construction. The first item in myfounditems is the last item added to the document (which is on the last pages of the document), the second item in myfounditems is the next to last item that was added to the document (which was moved to a middle page in the document). The net result is that instead of having the first item on the first page being Lot 1) and the item directly below it being Lot 2), my document is a hodgepodge of Lot numbers is a seeminlgly random order. Any thoughts on how to fix this?

tell application “Adobe InDesign CS5.5”
–Clear the find/change preferences.
set find text preferences to nothing
set change text preferences to nothing
–Search the document for the string “lot”.
set find what of find text preferences to “Lot ^9^9^9^9^9)”
#set change to of change text preferences to "Lot " & lotnum & “)”
–Set the find options.
set case sensitive of find change text options to false
set include footnotes of find change text options to false
set include hidden layers of find change text options to false
set include locked layers for find of find change text options to false
set include locked stories for find of find change text options to false
set include master pages of find change text options to false
set whole word of find change text options to false

      tell active document
                set lotnum to 1
                set myFoundItems to find text
                repeat with foundItem in myFoundItems
                          set contents of object reference of foundItem to "Lot " & lotnum & ")"
                          set lotnum to lotnum + 1
                end repeat
      end tell

end tell
display dialog ("Numbered " & (count myFoundItems) & " lots in this document. Next starting lot number is " & lotnum & “.”)

Hi. You’re going to need to reconfigure the page items or your search pattern. If something is in creation order and you want to impose arbitrary order, you might label the frame that the text is in and search by that identifier. The creation order could also be directly changed through selective cut and paste. Preferably, an InDesign text variable might be used in place of the original text; it should update, upon being moved elsewhere in the document.

I was hoping to access them by spread (page). The first match on the earliest page in the document, then the next, then the next.