Doctor: fix check_access_logs

Fixes #23936.