[cpp] Make fake this pointers smart pointers in local blocks.