Originally Posted by Chris Lux
However, does the spec really allow this. I read the part about opaque and sampler types and it seems to be quite picky about these types, where and how they can be declared.
Are you confusing "uniform block" with "struct"?
Opaque types cannot be used in uniform blocks, but I see no such prohibition on structs.