elper for Union creation and substitution: flatten Unions
    among parameters, then remove duplicates.
    r