Factor out canonicalizing selected values arg.