Fixes an edge case where an invalid object link (unlikely to happen) can lock up the UI.