This has broken `has_function` when `CCompiler.output_dir` is set. _Originally posted by @mkoeppe in https://github.com/pypa/distutils/issues/31#issuecomment-962520921_