Wrong URL of CSS background images

Nextcloud version (eg, 12.0.2): 15.0.5 (snap)
Operating system and version (eg, Ubuntu 17.04): Ubuntu Core 18
Apache or nginx version (eg, Apache 2.4.25): default that comes with snap
PHP version (eg, 7.1): default that comes with snap

The issue you are facing:
We are running out Nextcloud instance behind a reverse-proxy in the subdirectory /cloud/.
Several background images are not shown. When inspecting the CSS I can see there is a wrong URL generated:

.glyphicon-chevron-right {
    background: url('/extra-apps/calendar/css/public/../../img/rightarrow.svg') center center no-repeat;
}

The correct URL would be:

.glyphicon-chevron-right {
    background: url('/cloud/extra-apps/calendar/css/public/../../img/rightarrow.svg') center center no-repeat;
}

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Use reverse proxy in front of Nextcloud
  2. Map URL /cloud to Nextcloud server
  3. Set ‘overwritehost’ => ‘ourserver.net’,
  4. Set ‘overwriteprotocol’ => ‘https’,
  5. Set ‘overwritewebroot’ => ‘/cloud’,
  6. Open Calendar-app and inspect app-min.css

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => '***',
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => 'xxx.xxx.xxx.xxx',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '15.0.5.3',
  'overwrite.cli.url' => 'https://ourserver.net/cloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '***',
  'installed' => true,
  'overwritehost' => 'ourserver.net',
  'overwriteprotocol' => 'https',
  'overwritewebroot' => '/cloud',
  'defaultapp' => 'calendar',
  'default_language' => 'de_DE',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'ourserver.net',
  'mail_smtphost' => 'xxx.xxx.xxx.xxx',
  'mail_smtpport' => '25',
  'maintenance' => false,
);

Is there any parameter I can set, so that the mapping for the generated CSS is correct?