When a file is "recursively" foreign (e.g. the local wiki has English Wikipedia as a ForeignAPIRepo, and the file is actually hosted on Commons which is a ForeignDBviaLBRepo for English Wikipedia), the wiki will end up with an empty file description page and, when hotlinking, broken thumbnails, since the URLs used for these assume the file is local to the configured foreign repo.
Sample page: https://sandbox.semantic-mediawiki.org/wiki/MultipleFileRepos
Can be worked around by making sure that upstreams of upstreams have their own $wgForeignFileRepos entry and come sooner in the list, but (besides being non-intuitive, cumbersome and fragile) that will give the wrong result when the upstream and the upstream's upstream have different files with the same name.