implementation of tquery.tvset - see #284