Return elem that evaluates to the static frame pointer for function fd. If fd is a member function, the returned expression will compute the value of fd's 'this' variable. 'fdp' is the parent of 'fd' if the frame pointer is being used to call 'fd'. 'origSc' is the original scope we inlined from. This routine is critical for implementing nested functions.