Fix bug with requesting pieces

The code was requesting pieces from peers who might not have had them.