Fixes #10957. The builder --debug flag appears to be passed correctly, according to this test. This is a good test to keep, so won't remove it, but there is something else going on in the base test.