Add minor improvements to type checking for condition test;
Fix condition tests in tools/autobind.dao.
Add minor improvements to the handling of automatic returns.