Docker - IndexOutOfBoundsException

Can you please try this @CMonjo and @rki?

It also “fixes” the init_threads: 1 issue. I think that’s mostly important when processing more than 1 profile for multi-threading (and then also doesn’t produce errors), but pretty sure @HendrikLeuschner can shed more light on this.