I know it might not be what you're used to, but you could give the
Pixel Perfect Tile Editor a spin, possibly, and see if you can clean it up using the layer features it has instead.
I'm not sure what might be causing the bug, but it might be useful to see if another tool can take care of it.