Can you have a variable that represents which layer is 'active', and in the touch event, check the layer the button is on?
I.E. if button is layer 1 , and 'active_layer' variable is 1 , then do event on touch, else, if layer number/name doesn't match the 'active_layer' variable, don't do anything?