[sr-dev] git:master: core: fix return not working inside a while() loop