Slides being skipped

URL of experiment: TBPM_Pilot_May2022 [PsychoPy]

Description of the problem:
Hello! In my current experiment, task instructions are given via PowerPoint slides that I am importing as .png images. In code snippets, I have defined them as SlideDecks, and I am calling each Slide Deck, consisting of different instructions, during different loops of the experiment.

// At the very beginning of the experiment:

introSlide = ["resources/Slide1.png", "resources/Slide2.png", "resources/Slide3.png", "resources/Slide4.png"];
timeSlide = ["resources/Slide6.png"];
interimSlideGain = ["resources/Slide7.png", "resources/Slide10.png", "resources/Slide12.png"];
interimSlideLoss = ["resources/Slide7.png", "resources/Slide11.png", "resources/Slide12.png"];
postTimerSlide = ["resources/Slide14.png"];
thanksSlide = ["resources/Slide15.png", "resources/Slide16.png"];

// when I want to call a slide deck:

messageType = "introduction";

// next routine (Begin Routine Tab):
key_resp = new core.Keyboard({psychoJS: psychoJS, clock: new util.Clock(), waitForStart: true});

idx = 0;
selectedDeck = [];
if ((messageType === "introduction")) {
    selectedDeck = introSlide;
}
if ((messageType === "time")) {
    selectedDeck = timeSlide;
}
if ((messageType === "interim" && Cond === "Gain")) {
    selectedDeck = interimSlideGain;
    gainc = 'gain';
 //   CDN.push(gainc);
}
if ((messageType === "interim" && Cond === "Loss")) {
    lossc = 'loss';
    selectedDeck = interimSlideLoss;
//    CDN.push(lossc);
}
if ((messageType === "postTimer")) {
    selectedDeck = postTimerSlide;
}

if ((messageType === "thanks")) {
    selectedDeck = thanksSlide;
}
thisSlide = selectedDeck[idx];

// Each frame tab of same routine:

theseKeys = key_resp.psychoJS.eventManager.getKeys({"keyList": ["left", "right"]});
if (theseKeys) {
    if (((theseKeys[0] === "left") && (idx > 0))) {
        idx -= 1;
    } else {
        if (((theseKeys[0] === "right") && (idx < (selectedDeck.length - 1)))) {
            idx += 1;
        } else {
            if (((theseKeys[0] === "right") && (idx === (selectedDeck.length - 1)))) {
                continueRoutine = false;
            }
        }
    }
}
thisSlide = selectedDeck[idx];
Slides.setImage(selectedDeck[idx]);

This allows the user to jump back and forth between instructions, by using the arrow keys.
Everything used to work fine, or is still working fine for the slide decks ‘introduction’, ‘time’ and ‘thanks’. Offline all decks are working.
However, for ‘interim’ and ‘postTimer’, the first slide is skipped, meaning that for ‘postTimer’ no instructions are shown at all, since there is only one slide in the deck.
I can not figure out why that is the case. Help is much appreciated.
Two screenshots of the loop settings are attached. I have also tried playing with these settings, such as unticking the ‘is trials’ box, or setting the type to sequential. That didn’t change anything.