Global GSGuide not reporting/updating selected state

I might be misunderstanding the attribute usage here, but this global GSGuide isn’t reporting its .selected state, and despite being referenced in Layer.selection[0], Layer.selection[0].selected is False

Reproduction on Glyphs 3.1.2 (3151):

  • new file
  • add one guide to any character
  • make guide global
  • run print(Layer.selection[0], Layer.selection[0].selected) in macro window

similarly, trying to write to the .selected attribute (writable on most element types, and in theory on GSGuide as well according to the docs) results in an error, seemingly in the callback? (related issue):

Traceback (most recent call last):
  File "<macro panel>", line 2
  File "GlyphsApp/GlyphsApp/", line 4893, in <lambda>
  File "GlyphsApp/GlyphsApp/", line 3052, in SetObjectInLayer_selected
AttributeError: 'NSKVONotifying_GSFontMaster' object has no attribute 'selection'

I would not recommend to use .selection. Better do use guide in layer.selection.