Fix AttributeError when trying to list related items of a missing dataset