I tried tracking down the cause of this, but don't (yet) know enough about the symfony core... here's the problem, as I see it.
This page works fine:
But this one does not load properly:
A look at the source shows that the content is there, but the style sheets and scripts have not loaded because Symfony's helpers have interpreted them as, for example:
On the page without the script name (example.com/foo/slug1//bar) the paths are interpreted correctly and the 'jquery' reference from view.yml is loaded as "/js/jquery.js"
(As an aside, I am fairly sure that '//' is perfectly valid as part of an URL (even though it is a little odd). In my case, it crops up occasionally since the pages on my site have a structure of /foo/slug1/slug2/bar but sometimes they only have one of slug1/slug2 which leads to a // in the URL (I guess it's also possible that they might have '///'). However, if it is an invalid URL, please close the ticket with a note to that effect and I'll go quietly away... :) )