prefix_ref_iterator: break when we leave the prefix