We do it in inet_pton6, so I applied it here as well, and it made the tests pass.