Fixes a code path where stacktrace returns < 2 locations and thread.ReturnAddress would panic. Now returns an error.