Influence of stacking disorder on the dc conductivity of layered semiconductors