get_next_index working

Create a shadow copy of the stream because they have their own lifetime
separated from the relay_streams.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>