Adrian's version of Contains in less than O(n)