refs: copy the packed refs on iteration This lets us work without worrying about what's happening but work on a snapshot.