contains two methods
accessing the OCG's state using a name as parameter.
As there can exist various OCG with the same name this access is not well defined.
The current implementation accesses the first group with this name it can find.
To make the setter work a solution would be a loop over all groups with the given name and add them to ON or OFF. Consider to rename it to
The getter should return some error state if the groups diverge in state - or better drop it ...