Typically, though, the diesel bug only happens in the interface between the water and the fuel itself, so if you have a proper filter and separator on the pumping system it won't be a factor.
Gasoline, when it goes bad, goes bad from top to bottom and is not recoverable through e.g. a centrifuge like https://www.youtube.com/watch?v=x4Fdu3e4gYw