I didn't test it but makes sense. Maybe @mskala can confirm it works? If you are able to apply this patch, you may need to empty your cache by calling
./console cache:clear in your Matomo directory or deleting the files in
I haven't tested it extensively for side effects, but it seems to work. Thanks!