Fixed process::collect to handle an empty list.

Review: https://reviews.apache.org/r/13343