Fix issue 10270

Now make -j works nicely. On my machine, simple make runs in 34.8 seconds, and make -j4 finishes in 11.6 seconds, and make -j8 runs in 8.7 seconds!