[tsan] fix PR18146: sometimes a variable written into vptr could have an integer type (after other optimizations)