Make better use of talloc for TR_MSG handling