vectorof contract: add some tests and make flat variant subscribe to the val-first protocol