Rsync exclude a file with delete/delete-excluded but NOT exclude subdir with same name

I am trying to exclude the file “core” from backups.
I am using –delete and –delete-excluded.
There are subdirectories foo/bar/core/baz.txt that ought to be backed up.
However, rsync is deleting everyting under “foo/bar/core/” because I’ve excluded “core”.

I have tried “**/core”, “core/”(which is wrong), “core”.

It should, however delete “foo/bar/core”(file) “foo/bar/core/core”(file) “foo/core”(file). etc. But should leave “foo/bar/core/baz.txt”(file) intact.

In find I would just use find ./ -iname core -type f to identify these files.

My rsync command:

echo "core" > ${EXCLFILE}
rsync -aivx 
    --delete --delete-excluded --no-compress 
    --exclude-from=${EXCLFILE} 
    ${SRC}/ 
    ${DST}/ 
    -n