[9.18] Fix DNSRPS builds
Backport of !7450 (merged)
Commit 183cd1bb was excluded from this backport as the problem it addresses does not affect v9.18.
Closes #3827 (closed)
Backport of !7450 (merged)
Commit 183cd1bb was excluded from this backport as the problem it addresses does not affect v9.18.
Closes #3827 (closed)