Improve tail call detection and return instructions emit