Example 1:
if red['signal-T'] then
if red['signal-S'] then
This code work fine.
Stuff inside these if's should always be executed due to same thing as above, so it works simply because T gets re-assigned to signal-S value in this case, and it obviously won't work if you swap places of these condition blocks. If it doesn't work like that, should be a bug.
But it don't work : out['signal-T'] has no value.
Technically zero will be assigned, but factorio just hides/ignores these in UI, I think, as all signals read "0" by vanilla combinators by default.
That last bit and to avoid always typing (red.stone or 0) + 30
when using these is the rationale for default-0 operation (nil + number = error!).