Added a test to check correctness of interleaving 5 vectors. Fixed some bugs exposed by the test.