Fixed reference count of return value.
Merge branch 'returnref' into my_branches