Environmental degradation and comparative advantage reversal