goas/loop: fixed bug with loop returning errors after calling stop (e.g. during cleanups)