We investigate a stochastic capacitated lot-sizing problem whose optimal solution requires the integration of dynamic safety stock planning into lot-sizing. Then, we introduce an integrated mixed-integer linear program with service-level constraints. The integrated model endogenously sets dynamic safety stocks over replenishment cycles of different lengths determined by the model. Since there is limited capacity, soft service-level constraints are introduced to guarantee a feasible solution. In the experimental study, we compare the performance of the integrated model to the stochastic dynamic program and the widely-used sequential approach. If available capacity increases, the integrated model closes the gap to the lower bound approximated by using a stochastic dynamic program. If capacity is limited, the integrated model outperforms the sequential approach because it yields identical service levels with lower inventories. However, in the case of sufficient flexibility (capacity), we identify a major shortcoming of the integrated models: They can generate excessive safety stock if the re-planning opportunities under rolling horizon planning are ignored. To overcome this problem, we extend the integrated model to account for those re-planning opportunities.