[BUG #8678] Improved the carousel loop implementation