Normalize behaviour of DNS function on Windows This is a follow-up on commit 4a438b44694d4caf86d8e57266ed2fc2f4ae6213 Add some tests to hopefully not forget it next time