Fixes segfault on certain memoized functions

Summary: Functions that use $this as a local get an extra initialization step. The easiest way to trigger this is to pass $this as an argument in a function call.
When a function with a local $this is memoized, we were trying to init the $this local in the wrapper and segfaulted because the wrapper doesn't have any named locals.

Reviewed By: @jano

Differential Revision: D1554192