Fix guard compilation

Do not compile on additions, removals, and on files with no tests.