Drawingelement#visible? seems to return inconsistent results

You are right. The example in the #drawing_element_visible? method documentation resulting the same error.

It seams eider the documentation is erroneous or the method itself cannot handle the group or component instance in the root of the model.

As I see, the method is looking for the leaf of the InstancePath, however the InstancePath of the root instance does not contains the optional leaf entity…