Don't assume that a referred by URI will always exist (issue #7641 reported and fixed...