SSL issues when (empty) rules directory is defined

When enabling

--providers.file.directory=/rules

traefik fails to find the SSL certificates - previously it was successfully loading them. Now with this setting enabled it fails and serves its internal default certificate

How can this be fixed?

Version: traefik:v2.10.5

Details:

image: traefik:v2.10.5
    container_name: proxy
    hostname: proxy
    command:
      - --log.level=DEBUG
      - "--providers.docker=true"
      - "--providers.docker.swarmMode=false"
      - --providers.docker.endpoint=unix:///var/run/docker.sock
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.network=traefik_net"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - --providers.file.directory=/rules # NOTICE this directory is completely empty!
      - "--providers.file.filename=/etc/traefik/dynamic_conf.toml"

Turns out that this gets fixed when I move the dynamic_conf.toml which contains the SSL config inside this directory.

It was previously specified via
providers.file.filename=/etc/traefik/dynamic_conf.toml"