Fixed layer generation to only build trigger lists from the given layer.

- Required more complex correlation to get the layer ownership right for each trigger macro from the global list