Apply patches BEFORE generating ninja build specs.

How did I miss this?