Project languages reports very wong percentages for XML/XSLT project

Summary

For a project in a private repo, I see very wrong values for the percentage of the project that is in different languages. The project reports:

 Programming languages used in this repository

      XSLT    99.51 %
      Shell    0.49 %

There some XSLT, but the bulk of the project is XML, which isn't even reported.

Steps to reproduce

This is in a private repository, and I'm not making it public. However, I can give statistics on the content:

charles@laputa ~/h/prm (master)> loc .
--------------------------------------------------------------------------------
 Language             Files        Lines        Blank      Comment         Code
--------------------------------------------------------------------------------
 XML                    155        73393        16783         1035        55575
 Plain Text               3         1547          391            0         1156
 Makefile                 2          351           37            4          310
 Bourne Shell             1           54            9           15           30
--------------------------------------------------------------------------------
 Total                  161        75345        17220         1054        57071
--------------------------------------------------------------------------------

Since it seems that loc does not report XSLT, we can see the summary of the number of files present:

charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.sh' | wc -l
       1
charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.xsl' | wc -l
      16
charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.xml' | wc -l
     155
charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.png' | wc -l
     112

There are also a number of binary files in a file format that would not be recognised by any other tools.

IF the calculation were being performed on the number of lines in the file, rather than the number of files of a given size, this might matter, so here are the file sizes in lines:

charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.xsl' -exec cat '{}' \; | wc -l
   10773
charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.xml' -exec cat '{}' \; | wc -l
   73380
charles@laputa ~/h/prm (master)> find catalog src *.* -name '*.sh' -exec cat '{}' \; | wc -l
      54

Finally, here's the top level directoy, in case that matters:

charles@laputa ~/h/prm (master)> ls
Makefile              index-makefile-ro.xsl index.xsl
catalog               index-makefile.xsl    src
do-build.sh           index.xml

What is the current bug behavior?

Project reports as 99.51% XSLT.

What is the expected correct behavior?

I'm going to make a stab at this reporting:

Shell:  0.58%
XSLT:   9.30%
XML:   90.1%

(assuming PNG and unrecognised binary files ignored, and the number of files used as a reference)

Results of GitLab environment info

Report based on GitLabCE, 11.7.5.

System information
System:         Ubuntu 14.04
Current User:   git
Using RVM:      no
Ruby Version:   2.5.3p105
Gem Version:    2.7.6
Bundler Version:1.16.6
Rake Version:   12.3.2
Redis Version:  3.2.12
Git Version:    2.18.1
Sidekiq Version:5.2.3
Go Version:     unknown

GitLab information
Version:        11.7.5
Revision:       c5b5b18
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     postgresql
URL:            https://gitlab.gerph.org
HTTP Clone URL: https://gitlab.gerph.org/some-group/some-project.git
SSH Clone URL:  git@gitlab.gerph.org:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers: 

GitLab Shell
Version:        8.4.4
Repository storage paths:
- default:      /var/opt/gitlab/git-data/repositories
Hooks:          /opt/gitlab/embedded/service/gitlab-shell/hooks
Git:            /opt/gitlab/embedded/bin/git