Tweak compiler checks in unnecessary_copy_tests.

I'm running these tests by default now, which will probably break
several compilers, so I'll need to add extra conditions later.