Don't attempt to wrap when searching for ports.

Search for free port already covers [start,end]. No point in trying to
wrap around. Also, code was broken.