mergeRuntimeOwned = (a, b) => {
	if (b === undefined) {
		return a;
	} else if (a === b) {
		return a;
	} else if (a === undefined) {
		if (typeof b === "string") {
			return b;
		}
		return new SortableSet(b);
	} else if (typeof a === "string") {
		if (typeof b === "string") {
			const set = new SortableSet();
			set.add(a);
			set.add(b);
			return set;
		}
		const set = new SortableSet(b);
		set.add(a);
		return set;
	}
	if (typeof b === "string") {
		a.add(b);
		return a;
	}
	for (const item of b) a.add(item);
	return a;
}
@param {RuntimeSpec} a first (may be modified)
@param {RuntimeSpec} b second
@returns {RuntimeSpec} merged