Make sure patches are applied before build