GitHub #172: Fixes for layer scope changes