Small optimization to matching IP rules