Miserable copy-paste implementation of xrange was replaced