Handle UUIDs in `Model::getRelated()` (see #6525)