Bogtown, I can tell you that molting is hard on birds. Especially if it is a hard molt...one that the bird loses a lot of feathers at one time and regrows them quick....as compared to a slow molt where the bird slowly loses feathers and takes for ever to regrow them. Molting can make them lose their appetites, make them very tired, diarrhea, grumpy and of course having to produce the nutrients to make a new set of feathers is taxing to the birds internal reserves. Feathers are made up of mostly keratin protein. And many times if the bird is lacking in proteins and amino acids, will get what protein it needs from it's own body to produce these feathers. I also keep parrots and some of the really old ones will get weakened immune systems during this time. I see a LOT of diarrhea during their molts with these old birds.
So if a bird is already weak or has an issue going on inside the body during a molt, the molting process will drag the bird down even further. This is probably what happened to the bird with the cocci. Cocci is extremely rough on a bird to begin with. And no doubt was fighting that battle before the molt.
So keeping the flock as healthy as possible will help a bird get thru a stressful molt easier.