Issue #22823: Use set literals instead of creating a set from a list