Functoriality and flat base change for the cotangent complex