Recentf cleanup logs a lot of error messages

What happened?

Everytime recentf cleanup happens, in addition to the usual

Cleaning up the recentf list...

I also see a lot of messages of the form

Wrong type argument: "Wrong type argument", "tramp-file-name FILENAME"

I think it started happening quite recently.

What did you expect to happen?

Recentf cleanup to happen without errors.

Attempt to diagnose

I think the problem is with doom--recentf-file-truename-fn specifically with the use of tramp-file-name-localname in it. I think it should instead be tramp-file-local-name or file-local-name.