Fixed merge-induced compilation failures, replacing some pointers with counted_t pointers.