Only follow a pointer once.  Use a ref if it's been followed before.