This regressed with https://github.com/matomo-org/matomo/pull/16830/files#diff-3f15e6e8235bb796794c812a3c85b929cb82ae02f1dfbcd6e74e105d1fb31a6bL170-R170
fixes #16999
@sgiehl can you add a test for this?
@diosmosis won't be able to do that the next days. Could you maybe have a look or maybe we create a followup issue for it.