Enforce shard constraints

* Don't take from a node if that would take it below the target level.
* Don't take the same range twice to the same target node.