[#5785] fixed import errors when submodules are used in git repos, but they still show up as files in the tree listing (instead of folders) and return a 404 when clicked to view (instead of showing some message indicating that submodules cannot be viewed, similar to viewing binary files).
As of [#5411], they are now left out of the display entirely, which is arguably worse. We need to add some logic to handle these reasonably without crashing out on them.