Split with-collection into with-read-collection and with-write-collection.