When trying to set a remoteId for a tag the operation will fail with a database error. This happens because Akonadi is trying to insert a row into the 'tagremoteidresourcerelationtable' and return the id of the newly added entry. This will however fail as the table is a special case of a n:m relation and does not have an 'id' column.
At the moment the XSLT database code generator only handles 2 types of tables - regular tables with an 'id' column and n:m relations between two regular tables. The latter ones are limited to two columns - identifiers from both tables in the relation. The tag to remoteId relation is different as it contains 3 columns: resource id, tag id and the resource-specific remote id string. Such table type is not currently supported by the XSLT.