Improve code clarity for the set lookup logic (GH-20028)

1 file changed