As expected while reviewing #62417 this is indeed not practical without a better system to retrieve this information. Fixes #66179.
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.