publicLayersOnly isn't used. Let's remove it.