Optimize, simplify, extend tests.
Merge topic 'WriteCompilerDetectionHeader-module' into next

4ec1439a Optimize, simplify, extend tests.