Project has too many branches to search - Increase Query Limit

We have just moved our GitLab instance (migrated off 7.1 CE to 11.2.3 EE), and found out about this update:

Is there a way to increase the query limit for branches in a project? We have a handful of repositories with 1,000+ branches that will display “Project has too many branches to search” when looking at a particular commit.