Now handles nested function calls

Nested function calls (eg `bar(bar))` ) was not handled before. It is
handled now