selectedIndexes of a repetition currently show all available indexes

In a repetition the selectedIndexes currently contain all available indexes, i believe this is not the intended behaviour. This patch makes it contain only the indexes of the selected iterations.