Why not ForEachItemIn(n, pendingBuckets) instead of accessing a member of owner?

You could also combine the two loops.