Fixing fix for issue #120

indexes.getByIndex(i).update() must be called second time
after second call to
    document.refresh()
    indexes = document.getDocumentIndexes()