Fixed Contains for IDSet

Fixed a problem with the binary search in IDSet. Add an extra test to
ensure we catch anymore problems.