Sometimes you need to call get_refs twice, first catching an
StopIteration exception then getting the actual result.