tools: use Set instead of { [key]: true } object
#41695
+3
−6
Merged