MP1-4506 : Fix regression for slideshow with loop option.