Fixed, observed behavior is correct, but there's still a conditional that's not quite right causing a thing that should only have happened once to instead happen 5 times, but with 4 of them correctly being effective no-ops. I'll have to look into that a little later.
Having now looked into it, pretty sure the problem is two conditionals that are the wrong way around such that the whole thing always evaluates as true even if it shouldn't.