Stable Calculation of Optical Properties of Large Non-Periodic Dissipative Multilayered Systems