Thank you Andro,
That solved my problem.
But from the users point of view - this is a bug. Hiding a particular layer means temporarily removing it from the working space - both visually and functionally.
You can not expect that the layer is hidden only visually, but still remains present functionally.
That is absurd.
Again, thanks.