allow non final returns in inlined functions (close #2215)