Fix undefined behavior in vector shift tests.