Calculate background source name (fixes #1935)