GLSL compiler bug with xfb_stride

The NVIDIA GLSL compiler in Linux driver versions 367.35 and 370.23 does not appear to behave correctly with respect to the “xfb_stride” layout qualifier. When defining multiple transform feedback buffers in a shader, if the xfb_buffer qualifier is used to select the buffer index for the block, as in:

layout(xfb_buffer = 0, xfb_stride = 4) out block0 {
    layout(xfb_offset = 0) out float feedback0;
};
layout(xfb_buffer = 1, xfb_stride = 12) out block1 {
    layout(xfb_offset = 0) out vec3 feedback1;
};

the driver reports “error C7605: layout qualifier ‘xfb_stride’ conflicts with previous declaration” on the closing brace of the second block. However, if I change the default output buffer before each block declaration:

layout(xfb_buffer = 0) out;
layout(xfb_stride = 4) out block0 {
    layout(xfb_offset = 0) out float feedback0;
};
layout(xfb_buffer = 1) out;
layout(xfb_stride = 12) out block1 {
    layout(xfb_offset = 0) out vec3 feedback1;
};

then the error is no longer generated. It seems the driver may be incorrectly validating the xfb_stride value against the stride for the default buffer, rather than the stride for the buffer selected with xfb_buffer for the current block.