better treatment of union parameter types in type arg inference
work toward #660