Fix crash in sorter if no StudyUID in meta data.