Correcting a bug in sequence matrix generation, adding a unit test to catch the original error.