[safeguard] Return intermediate stash when reaching either max-iter or max-stash-size + log warning
Merge remote-tracking branch 'origin/develop' into develop