Use tuple-based comparison to avoid lexical-comparison shenangians

Per review of Bo Shi.
Loosen IPv4 identification to concur with AWS's laxity

Per review of Bo Shi.