Gitlab crashes (http 500) when licence file is in repository

My gitlab instance (from source) crashes currently when in the repository is an LICENCE file and the user access the project main page.
Other pages are working fine and other project without a licence file.

 Rendered layout layouts/project.html.haml (Duration: 9644.2ms | Allocations: 97238)
Completed 500 Internal Server Error in 9696ms (ActiveRecord: 34.8ms | Elasticsearch: 0.0ms | Allocations: 111969)

ActionView::Template::Error (uninitialized constant Licensee::InvalidLicense):
    18:
    19:   - if is_project_overview
    20:     .project-buttons.gl-mb-3.js-show-on-project-root
    21:       = render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true
    22:
    23:   #js-tree-list{ data: vue_file_list_data(project, ref) }
    24:   - if !Feature.enabled?(:new_dir_modal, default_enabled: :yaml) && can_edit_tree?

app/models/repository.rb:641:in `rescue in license'
app/models/repository.rb:633:in `license'
lib/gitlab/repository_cache_adapter.rb:113:in `block (2 levels) in memoize_method'
lib/gitlab/utils/strong_memoize.rb:28:in `strong_memoize'
lib/gitlab/repository_cache_adapter.rb:203:in `block in memoize_method_output'
lib/gitlab/repository_cache_adapter.rb:212:in `no_repository_fallback'
lib/gitlab/repository_cache_adapter.rb:202:in `memoize_method_output'
lib/gitlab/repository_cache_adapter.rb:112:in `block in memoize_method'
app/presenters/project_presenter.rb:153:in `license_short_name'
app/presenters/project_presenter.rb:312:in `license_anchor_data'
app/presenters/project_presenter.rb:42:in `statistics_buttons'
app/views/projects/_files.html.haml:21
app/views/projects/show.html.haml:29
app/controllers/application_controller.rb:133:in `render'
app/controllers/application_controller.rb:541:in `block in allow_gitaly_ref_name_caching'
lib/gitlab/gitaly_client.rb:322:in `allow_ref_name_caching'
app/controllers/application_controller.rb:540:in `allow_gitaly_ref_name_caching'
app/controllers/application_controller.rb:490:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:481:in `set_session_storage'
lib/gitlab/i18n.rb:105:in `with_locale'
lib/gitlab/i18n.rb:111:in `with_user_locale'
app/controllers/application_controller.rb:475:in `set_locale'
app/controllers/application_controller.rb:469:in `set_current_context'
lib/gitlab/middleware/speedscope.rb:13:in `call'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'
lib/gitlab/jira/middleware.rb:19:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:21:in `call'
lib/gitlab/middleware/multipart.rb:173:in `call'
lib/gitlab/middleware/read_only/controller.rb:50:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:21:in `call'
config/initializers/fix_local_cache_middleware.rb:11:in `call'
lib/gitlab/middleware/compressed_json.rb:26:in `call'
lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'
lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:75:in `call'
lib/gitlab/middleware/release_env.rb:13:in `call'

this is the error in the production.log

did anyone has an idea where to start dig in?

Systeminfo:

GitLab 14.6.1
GitLab Shell 13.22.1
GitLab Workhorse v14.6.1
GitLab APIv4
Ruby 2.7.5p203
Rails 6.1.4.1
PostgreSQL 12.3
Redis 6.2.6