Type is available by reference.IsRemote() already, so seems like common iterator model provides more value than weird 3 value return. Reworked code to have common iterator interface to illustrate. Seems cleaner. What do you think?