Yeah, you need to make sure that the pixels that are supposed to be transparent still have the same colors as the surrounding ones that aren't, or color bleeding like in the last pic will happen
I thought the bleeding was caused by the depth buffer in my picture.
In my last two examples I'm drawing the slug before the wall behind it. That draws a big square to the depth buffer. In the picture where I don't discard any fragments at all I get the big blue square surrounding the slug and blocking the wall behind. In the picture where I discard fragments with alpha less than 0.5 there are still fragments that, while having an alpha less than zero, still block the wall behind since they're drawn to the depth buffer.