Add the ability to get the last exit status from any scope Closes #812 See merge request !888
mentioned in issue #839 (closed)