This code is correct, but Chisel2 erroneously flags it as a Chisel3 compatibility error because it looks like Vec(Reg) when factor=1.