I think you need a check here so that you're not pulling a victim when that would induce the target node to fall below the TargetLevel. Something along the lines of:

    [{_, [Victim|_]=NodeShards} | _] when length(NodesShards) > TargetLevel -> {ok, Victim};