@Aerilius, describes the simplest and safest pattern if the instance has no attribute dictionaries, you want to discard any attribute dictionaries and you care not for any of the instance’s properties (ie, material, hidden, layer settings, etc.)
We’ve posted Ruby workarounds several times. I remember @TIG posting a really good example that copied the properties and then all the instance’s attribute dictionaries over to the new group instance.
I think that the hidden= was bugged in this regard, if I remember correctly.
That then makes the purpose of the #hidden? method kind of moot.
I asked about the hidden flag in the following Issue for the C API, but got no response then.
The issue is still open, as “Needs Information” and has not been fully processed (ie, logged internally.)