Fixing stack overflow crash introduced by SDD fix, Alex might want to port this to iteration branch if not too late

[#54850586]