Fix Clone_Function for proper function frame identification (cc#2044)

Based on the fix to [cc#2025](http://issue.cc/r3/2025) (pull #122). Tested in Linux.

Fixes [CureCode issue 2044](http://issue.cc/r3/2044).