for_each_alternate_ref: replace transport code with for-each-ref