Avoid stat-ing stdlib path if it's unreadable
#55992
Merged
stat-ing stdlib path if it's unreadable
#55992