Better version of DetectAddressMatchIPv6() function to fix logic flaw.