reference: get references out of the iterator

Allow getting references out of the iterator instead of just names.