Fix a bug with the needs-compiling check.