tools: fix bug in prefer-primordials lint rule
#46659
Merged
prefer-primordials lint rule
#46659