Improve coverage of docker_registry.lib.layers