MAINT: Replace xrange by range.

A new use of xrange wriggled it's way in, this replaces it with range
for python3 compatibility.