KRACOEUS-8137: Stack overflow fix