Ah, now I get what you mean with "replacement". Sorry, I am not a native speaker :-)

Actually, it does not make sense to generate random indices with replacement, I see this as a bug and fix it.