[query-params-new] Fix active link to nested parent with query params

Resolves 5044
There must be a better way to do this check.