Behind many production function estimators lies a crucial assumption that the firm's choice of intermediate inputs depends only on observed choices of other inputs and on unobserved productivity. This assumption fails when market frictions distort the firm's input choices. I derive a test for the assumption, which is rejected in several industries. Using weak identification asymptotics, I show that when the assumption fails, a simplified dynamic panel estimator can be used instead of choice-based methods because it requires choices to be distorted. I propose criteria for choosing between estimators, which in simulations yield lower error than either estimator alone.