Speed up has_feature (hopefully)
issue #1010 use xrange, not range to iterate indefinitely