KeyValueRecordVisitor should accept a register from outside rather than allocate one itself