Currently, a datastore is selected based on the layersToLink with a too-strict heuristic – if a dataset is included that lives on another datastore and that does not have isVirtual=true, that datastore is required. However, if the dataset’s paths all point to remote storage anyway this constraint might not be needed (depending on which datastores have credentials).
This is a follow-up for #8844