Avoid some copying handling inter-gen roots.

We used to handle this by putting the entries onto a temporary list,
then copying them and counting if there were any. There's an easier
way, though: just look at the worklist size before and after. Again,
not much impact from this, but it avoids some work.