Upstream fix for carousel-functionality on autoPlay brought down to vertical codebase - this fixes a bug where vertical autoplay tries to progress past the last slide. The fix causes autoPlay to go back to slide 1

Signed-off-by: Ivan Suftin <isuftin@usgs.gov>