Fix syntax error in dns_amp
Land #3166 and also #3167

[Closes #3167]