Are you trying to send messages to a layer in an active layer set or a hidden layer set?
You don't need to change the focus to a layer in the active A or B layer set to control the layer. You can just change the parameters via the layer number: 1-10.
Example: If you want to change the scale of layer 3 in the layer set GROUP A/0 but the current focused layer is layer 7, you can just send this keyword: modul8.setValue('ctrl_layer_scale_factorUniform',0.6,3)
I have not found a way to control a layer that is not in one of the active layer sets. Maybe you could do it by direct reference to the layer ID, which I think is unique for every instance of a layer in any of the layer sets. I don't know how to send a message to a layer via layer ID, though. That would be a great thing to be able to do, since you could get and store the ID for every layer you activate.