[PD] Stack overflow / double loop