Allow arbitrary masking of layers