KOHA_VERSION is not passed to templates, so all JS and CSS urls are wrong.
It seems I've been too quick to open this bug report, the rewrite rules work even when KOHA_VERSION is empty.