Tail call optimization (close #437)