Apparently one can still create ipv6 sockets even when has_ipv6 is False

This is a fix-up for commit 5c071b6.