I figured something out yesterday and wanted to share it with you.
In my case, {$logo_url} was always logo.jpg (apparently wrong). I think the number in logo-1.jpg is the shop ID (because of the new multi-store feature).
In the database and in the table called "ps_configuration", there are some interesting things.
This is what I found regarding logos (almost the same as this):
PS_LOGO = logo.jpg
PS_LOGO_MAIL = logo_mail.jpg
PS_LOGO_INVOICE = logo_invoice.jpg
PS_FAVICON = favicon.ico
PS_STORES_ICON = logo_stores.gif
I had not found this anywhere in the back office. But wait, there's more...
PS_LOGO = logo-1.jpg
PS_LOGO_MAIL = logo_mail-1.jpg
PS_LOGO_INVOICE = logo_invoice-1.jpg
PS_FAVICON = favicon-1.ico
PS_STORES_ICON = logo_stores-1.gif
There were duplicate fields with different values! This must have happened during my upgrade from PS 1.4 to 1.5, probably due to a bug.
This is what I did:
Deleted the duplicate fields.
Kept only logo.jpg, logo_mail.jpg, etc, because some code still has these names hardcoded. You may have to keep the other ones though, especially if you use the multi-store feature.
This solved all of my problems with the logos not appearing correctly.