Resolve error on multiple layer requests

In certain deployment models, the configuration is shared between
requests. The custom layer should not be removed or subsequent requests
will result in errors.