It is, it's the task of the kernel to refuse to create ipv6 sockets if
ipv6 is disabled, certainly not that of the software to find the
platform specific way of caring if ipv6 is enabled or not.
Open a bug against the kernel if you think this is really an issue (I do
not see what's the issue if ipv6 really is disabled those sockets are
just harmless and will never be used).