improved indexing algorithm by only traversing the subject term to retrieve indexing pairs when the cell structure has been modified in previous rewrite step