From what I've gathered from talking to various people the more unfit you previously were the easier it is for your body to adapt muscle even while losing weight "Beginners Advantage" or something like that.
I've gained a whole lot in the past year but it really started to increase with running for some reason maybe cause I'm hauling so much weight around. Running isn't usually though of as a muscle builder.
If you have a ton already though I hear it's better to go through cycles of building and weight loss.