Bugfix: also look at layers in layer groups… not just the top layers.