Hosting v11 in a sub-application causes 404 errors on many files

After upgrading our non-prod site to v11, I noticed a major issue with the change to use the connectionStrings.config file for the SiteUrl property when hosting the site under a sub-application in IIS vs at the root level.

When configuring the SiteUrl property to use "https://sub.domain.com/community/", the site attempts to access SOME files at https://sub.domain.com/community/community/cfs-filesystemfile - notice the double /community/community.  SOME files however, do have the correct URL like sub.domain.com/.../anonymous.gif.

When configuring the SiteUrl property to use "">https://sub.domain.com/", it removes the double /community/community on SOME files, but then removes the /community from the files like this: sub.domain.com/.../anonymous.gif which then just throws 404 errors.

This seems like a pretty bad bug or else my site configuration is out of whack.