Use metadata to determine ip_version, not mmdb->depth