[bugfix] rhs of assignment may modify lhs pointer