Object-Selection Logic Fails On Nested Blocks

Hi, I noticed unexpected behaviours with blocks :

In the general case, a block instance hosted in a visible layer having all its geometries in a hidden layer is invisible, un-selectable, and does not mask selection of other objects behind.

This logic breaks when the geometries of the block are other blocks (nested blocks). Hiding the layer of those geometries (the nested block) does not mask selection anymore. And, if the layer is only “Model-on hidden”, then the root block becomes selectable with window-selection.

This is bad for 2 reason :

  1. It is very unpleasant to click for selection, and selection fails completly (neither root block get selected, nor objects behind in the view)
  2. It is possible to select a fully-unvisible block when layer is “Model-on hidden”.

I attach a simple definition to test this, please have a look.

261001_Block Selection Bug.3dm (103.6 KB)