Boy is this loop confusing. Perhaps a little more doc above? something like `reshuffle the static tabs and non-static tabs` or such to make it clear that the code is trying to keep the sequence of static and non-static set while changing the order of the non-statics? I assume they get shuffled in advanced settings? or are they always non-static followed by static? if the latter, then this can be simpler by finding the beginning of the static ones and replacing that part of the list.