build: don't apply patches twice