AUTOMOC: Skip PCH when all sources files skip the PCH file too

Fixes: #23464
4 files changed