Fix patching bug when profiling a method with a non-void return type.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>