A slight improvement in speed: This version uses [array] to store the indices. To create the chains, the array is combined with the end of the array and chains are taken directly from this combined array. The downside is that the structure of the source material that is in the indices cannot be looked at like it was with [text], but for practical purposes, this should not be an issue. Also some other slight improvements.
This is now in the public domain. Thanks again for the great collaboration!
Edit:
Some more slight improvements. Also i added the clipping of the order again, as i think it contributes positively to the user experience. It is explained in the help file and there is a message when the chains are being created, so it should be reasonable.