Try using a more realistic name.
Say your real domain is: server.domain.com
Then try: notserver.domain.com testserver.domain.com serverxyz.domain.com
[none of which need to be resolvable - but could be]
I don’t know that that will fix the prblem.
[probably won’t]
But I have to rule it our first.
So, if it doesn’t, then I would suspect that there may be an issue with the “type” and the “value(s)” used by “$dnsIdentifiers” in your code [or localization issue].
For that, I would try a simple set and then print back the value(s) and compare.