Block/struct scoping for varyings

So I was playing a bit more with stream out geometry shaders (link), and gave another go at avoiding the needless copy/paste/modify for declaring all the stream outputs and for populating those outputs when you want to send the exact same list of 5 to 10 output values to 1 of 4 output streams. That is, to avoid:

However, the link fails because it can't find out0.var1, out0.var2, etc. (registered with glTransformFeedbackVaryings). Apparently while the struct scopes the struct members properly in the shader, the compiler loses this scoping info. You can register "var1" and "var2" with glTransformFeedbackVaryings, but who knows which stream output it's attaching to. There's no way AFAICT to designate "which" stream you're referring to when you use those unscoped vars.

Same as above but with changed varying declarations. This compiles and links (with varyings registered being out0.var1, out0.var2, etc.). However, anything the shader tries to output on stream other than 0 (for instance, stream 1:

Code glsl:

out1 = OutStruct(5678,-1);
EmitStreamVertex(1);

is never registered as a primitive output by GL. That is, never bumps the GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN count for that stream output. But stream 0 works fine -- I get all the primitive outputs that should have gone to stream 0, and only those outputs.

Am I doing something obviously wrong here?

Here's the full shader in case someone wants to run it through the compiler: