Wrapping sprites along the X-axis change the Y value
As the position X increases the Y value changes despite the Y value being constant. The issue appears to be in the TextureData class. When calculating the index of the pixel to replace the X value is not wrapped along the view boundaries causing the value to scale out and the row of the index to go up or down. Changing
var index = x * width*y; to
var index = (x % width) + width*y; in SetPixel resolves the issue.