Fix active link to nested parent with query params

Resolves 5044