The only way I managed to find to stop this is to re-colour each section of the colour bar in Inkscape with the discrete colour that was meant to be in that section. In reality, I think this just inserted another rectangle of that colour within that box, but it worked ok. This wouldn't work if my tickmarks didn't completely separate each section of the colourbar though.
Not a pretty solution, but it worked for me!